-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsimple_python_app.py
More file actions
41 lines (27 loc) · 796 Bytes
/
Copy pathsimple_python_app.py
File metadata and controls
41 lines (27 loc) · 796 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# simple beginner code/program
print("User 1")
name = input("Type your name: ")
age = int(input("Type your age: "))
dob = int(input("Type your date of birth: "))
person1 = {
"name" : name,
"age" : age,
"DOB" : dob
}
print("User 2")
name2 = input("Type your name: ")
age2 = int(input("Type your age: "))
dob2 = int(input("Type your date of birth: "))
person2 = {
"name" : name2,
"age" : age2,
"DOB": dob2
}
if person1["DOB"] < person2["DOB"]:
print(person1["name"] + " is born earlier than " + person2["name"])
else:
print(person2["name"] + " is born earlier than " + person1["name"])
if person1["age"] > person2["age"]:
print(person1["name"] + " is born earlier than " + person2["name"])
else:
print(person2["name"] + " is born earlier than " + person1["name"])