-
Notifications
You must be signed in to change notification settings - Fork 0
/
task3.py
35 lines (26 loc) · 838 Bytes
/
task3.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
# Task 3
# Import Libraries
plankdatastructure = []
# would be in task 1
name = input("Enter name: ")
# PLANK SPONSOR
# validate plank sponsor
while True:
# ... inside the loop in task 1
isPlankSponsor = input("Is the person a plank sponsor? (y/n): ")
if isPlankSponsor == "y":
# verify plank sponsor
while True:
plankmessage = input('Enter message: ')
print('your message is: ' + plankmessage)
plankinput = input('Is this correct? (y/n): ')
if plankinput == 'y':
# add message to plank datastructure
plankdatastructure.append({'name': name, 'message': plankmessage})
break
else:
continue;
elif isPlankSponsor == "n":
break;
else:
print("Invalid input")