python
Dashboard
My Repos
Compilers
Python Online
Node JS Online
Golang Online
codepy
Login
My Repos
Sign Out
Online Python Interpreter
Stop
Run
frnd_dict={} print('Type in Your Values and Press (ENTER) once finished') while True: key=input('Enter name of Friend :') if key=='': break else: value=input('Enter DOB of Friend :') frnd_dict[key]=value print('----------------') print(frnd_dict) print('----------------') print('1.Display Birthday\n2.Add New Birthday\n3.Delete A Birthday\n 4.Update A Birthday\n5.Look Up A Birthday\n6.Show Current List\n7.Exit') print('----------------') while True: opt=int(input('Pick your Option : ')) if opt==1: print(frnd_dict.values()) elif opt==2: key=input('Enter name of Friend : ')alue=input('Enter DOB of Friend : ') frnd_dict[key]=value elif opt==3: pop=input('Enter name of Friend : ') frnd_dict.pop(pop) elif opt==4: key=input('Enter name of Friend : ') value=input('Enter New DOB : ') frnd_dict.update({key:value}) elif opt==5: bday=input('Enter name of Friend : ') print(frnd_dict.get(bday)) elif opt==6: print(frnd_dict) elif opt==7: break else: print('Pick A Valid Option') print('----------------') print('----------------') print('Thank You :)')
Share this code with others
Public
Clear
My Repos
Repo
Lang
Login
Register
Login
Create a free account. No Credit card info required.
I agree with the Codepy
Term of Service
Sign Up