Question: set up the class names and numbers in a dictionary, with numbers as the keys and strings as the values. Then use the user's input

set up the class names and numbers in a dictionary, with numbers as the keys and strings as the
values. Then use the user's input to grab the class names from dictionary
 set up the class names and numbers in a dictionary, with

A certain video game internally stores the classes of characters as integers. Write a Python program that prompts the user for an integer called ClassNum whose values should be between 0 and 11, inclusive. Check that the user has entered a value in that range. If he didn't, print an error and then end without printing anything else. For entered USE DiCTIONARIES ith numbers as keys Class Name # Class Name 4 "Fighter" 10 "Wizard" Class Name 0 "Barbarian" 3 "Druid" 6 "Paladin" 9 "Sorcerer 2 "Cleric 5 "Monk" 8 "Rogue" 11 "Aberration" strings a s valoes "Bard" 7 "Ranger Print the value of the stored string as the Character Class Name

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!