-
Notifications
You must be signed in to change notification settings - Fork 0
/
class_data.py
56 lines (40 loc) · 1.31 KB
/
class_data.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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
import csv
# peerinfo = {'name':[],'hobbies':[],
# 'siblings':(),
# 'hometown':(),
# 'age':[],
# 'cities':[],
# 'languages': {'language':[], 'proficiency': []}
# }
peerinfo = {'name':["Hi! What is your name? ", []],'hobbies':[],
'siblings':(),
'hometown':(),
'age':[],
'cities':[],
'languages': {'language':[], 'proficiency': []}
}
name = input("Hi! What is your name? ")
peerinfo['name'] = name
age = input("Nice to meet you {0}! How old are you?".format(name))
peerinfo['age'] = age
sibling = input("How many siblings do you have, {0}? ".format(name))
peerinfo['siblings'] = sibling
hometown = input("Cool! What city are you from? ")
peerinfo['hometown'] = hometown
cities = []
other_cities = input("Have you lived anywhere else? yes/no? ")
if other_cities == "yes":
many = input("Yeah?! How many other places?! ")
count = int(many)
for x in range(count):
x += 1
ask = input("What is city number {0}? ".format(x))
cities.append(ask)
x +=1
peerinfo['cities'] = cities
hobbies = []
for i in range(1, 4):
entry = input("What is your #{0} hobby? ".format(i))
hobbies.append(entry)
peerinfo['hobbies'] = hobbies
# print (peerinfo)