Esempio n. 1
0
Options include:
[1]:Search your friedn's email from friendsbook
[2]:add your friend's email to friendsbook
[3]:del your friend's email from friendsbook
[4]:alter your friend's email from friendsbook
[5]:All friends list
[6]:exit the program
'''

num = raw_input('Press the number[1,2,3,4,5]-->')

if (num == '1'):
    sname = raw_input('Enter the name-->')
    if sname in frilist:
        p = Person(sname)
        p.saysome()
    else:
        print 'Not in it'
elif (num == '2'):
    sname = raw_input('Enter the name-->')
    email = raw_input('Enter the email-->')
    pa = addPerson(sname, email)
    pa.addbook()
    #p=Person(sname)
    #p.saysome()
    print frilist
elif (num == '3'):
    sname = raw_input('Enter the name-->')
    pa = delPerson(sname)
    pa.delbook()
elif (num == '4'):
Esempio n. 2
0
[2] : add your friend's email to firendsbook
[3] : del your friend's email from firnedsbook
[4] : alter your friend's email from friendsbook
[5] : All friends list
[6] : exit the program
'''


num=raw_input('Press the number [1,2,3,4,5] -->')


if (num=='1'):
        sname=raw_input('Enter the name-->')
        if sname in  frilist:
                p=Person(sname)
                p.saysome()
        else:
                print 'Not in it'
elif (num=='2'):
        sname=raw_input('Enter the name-->')
        email=raw_input('Enter the email-->')
        pa=addPerson(sname,email)
        pa.addbook()
        #p=Person(sname)
        #p.saysome()
        print frilist
elif (num=='3'):
        sname=raw_input('Enter the name-->')
        pa=delPerson(sname)
        pa.delbook()
elif (num=='4'):