-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcodeChallenge01.py
30 lines (24 loc) · 943 Bytes
/
codeChallenge01.py
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
#WAP to create a basic data collection system using python where:
#• It takes username, password and age from input
#• It must store atleast 2 user information taken from input. • After that, it should display the name, total age and avg.
#• Atleast 1 of the datastructures should be used.
#• You are allowed to use more than one code block
nameOne = input("Enter 1st Name\n")
password = input("Enter password\n")
age1 = input("Enter your age")
print("Name:", nameOne)
print("Password:", password)
print("Age:", age1)
print("_________________________")
nameTwo = input("Enter 2nd Name\n")
password2 = input("Enter password\n")
age2 = input("Enter your age")
print("Name:", nameTwo)
print("Password:", password2)
print("Age:", age2)
print("_________________________")
print("Users:" + nameOne + " and " + nameTwo)
totalAge = int(age1) + int(age2);
average = totalAge /2;
print("Total Age:" , totalAge)
print("Average", average)