Started Rectangle Project
This commit is contained in:
commit
26e1253c0d
39 changed files with 544 additions and 0 deletions
25
homework06/functions/functions03.py
Normal file
25
homework06/functions/functions03.py
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
def updatePerson(personDict):
|
||||
myPerson = personDict
|
||||
|
||||
emailAddress = input("Enter your email address: ")
|
||||
phoneNumber = input("Enter your phone number: ")
|
||||
myPerson['email'] = emailAddress
|
||||
myPerson['phone'] = phoneNumber
|
||||
|
||||
return myPerson
|
||||
|
||||
import pprint
|
||||
|
||||
person = {'Name': 'Zara', 'Age': 7, 'Class': 'First','Color':'Green'}
|
||||
|
||||
pp = pprint.PrettyPrinter(indent=4)
|
||||
pp.pprint(person)
|
||||
print("\n")
|
||||
|
||||
for key in person.keys():
|
||||
print(f" {key:12} {person[key]} ")
|
||||
|
||||
person2 = updatePerson(person)
|
||||
for key in person2.keys():
|
||||
print(f" {key:12} {person2[key]} ")
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue