Write a program that will do the following: 1. Create a dictionary with names as keys and grade as values, store the dictionary in a variable grade 2. You should be able to see if the name exists in the dictionary with the in keyword 3. If the name is in the dictionary, the program will display a grade associated with the student's name 4. If not, the program will ask you to add a grade for this student

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter8: Arrays
Section: Chapter Questions
Problem 9PE
icon
Related questions
Question

3.4

Write a program that will do the following:
1. Create a dictionary with names as keys and grade as values, store the dictionary in a variable grade
2. You should be able to see if the name exists in the dictionary with the in keyword
3. If the name is in the dictionary, the program will display a grade associated with the student's name
4. If not, the program will ask you to add a grade for this student
Transcribed Image Text:Write a program that will do the following: 1. Create a dictionary with names as keys and grade as values, store the dictionary in a variable grade 2. You should be able to see if the name exists in the dictionary with the in keyword 3. If the name is in the dictionary, the program will display a grade associated with the student's name 4. If not, the program will ask you to add a grade for this student
Expert Solution
steps

Step by step

Solved in 4 steps with 3 images

Blurred answer
Knowledge Booster
Dictionary
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT