Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit a88716f

Browse files
Birthday Dictionaries
1 parent aa12dd9 commit a88716f

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

‎Exercise-31-Guess-Letters.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ def win(word_list):
7272
"""
7373

7474
if '_' not in word_list:
75-
75+
7676
return True
7777
else:
7878
return False

‎Exercise-33-Birthday-Dictionaries.py‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@ def show_all_in_dict(dict):
3030
dict -- a dictionary needed to be print it's key.
3131
3232
"""
33+
3334
print('We know the birthdays of:')
35+
3436
for key in dict:
3537
print(key)
3638

@@ -49,6 +51,7 @@ def search(query, dict):
4951
return dict[query] if query in dict else None
5052

5153
def main():
54+
5255
Birthdays ={"Albert Einstein": "14/3/1889",
5356
"Bill Gates": "28/10/1955",
5457
"Steve Jobs": "24/2/1955"}
@@ -61,9 +64,11 @@ def main():
6164
else:
6265
print("{}'s birthday is {}".format(query, Birthdays[query]))
6366

64-
67+
68+
6569
if __name__ == "__main__":
6670
main()
71+
6772

6873
# Test Part
6974
# >>> %Run test.py

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /