0

Problem with python dictionaries

i have two teams(a) and team(b) each of my teams has two subteams i. e team(a) has subteams(b)and(c) and so with team(b) each of the subteams has their different enrollment requirements. i want to prompt a user to first of all enter the name of the team he wants to enroll in after that he is then provided with the subteams option for him to select before he can now see the selected subteam's enrollment requirements

8th Feb 2017, 9:14 PM
Prince Kelvin
Prince Kelvin - avatar
7 Answers
0
yes and what's the problem exactly?
8th Feb 2017, 9:15 PM
ramzi
ramzi - avatar
0
leshark you were close but it returned a key error may be you can modify and actually use random words as arguments for better clarity and understanding... thanks
8th Feb 2017, 10:05 PM
Prince Kelvin
Prince Kelvin - avatar
0
@ramzi i tried to be very descriptive in my question i dunno how to break it down anymore
8th Feb 2017, 10:07 PM
Prince Kelvin
Prince Kelvin - avatar
0
am receiving a syntax error while using nested dictionaries as suggested maybe you can give me the code at the play ground. i want something like this: footwears={shoes={'high heels': '6inches, 12inches, 'flat shoes': '2inches, '1inch'} print 'choose your foot wear' answer = input #in this case i type shoes if answer in footwears: #yes cos i chose shoes print (high heels or flat shoes) choice = input #Here i choose high heels print(footwears[choice]) here is just an example of what i want pls.
9th Feb 2017, 1:59 PM
Prince Kelvin
Prince Kelvin - avatar
0
@prince, everything is working, you just enter not correct input!!! try: team_a b or ream_a c
12th Feb 2017, 5:37 AM
Leshark
Leshark - avatar
0
thanks all your answers helped
18th Feb 2017, 3:08 PM
Prince Kelvin
Prince Kelvin - avatar