-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFeelingsInputPython.txt
More file actions
28 lines (23 loc) · 1.79 KB
/
Copy pathFeelingsInputPython.txt
File metadata and controls
28 lines (23 loc) · 1.79 KB
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
# Assignment: Develop a program that asks a user how many feelings they want to share with a maximum of 3 feelings. Then, depending on their answer, take the associated number of feelings in and add them to a list
# ask user for three feelings
feeling_number = int(input())
feeling_list = []
# test if 1 feeling is entered
if feeling_number == 1:
feeling1 = input()
feeling_list.append(feeling1)
# test if 2 feelings are entered
if feeling_number == 2:
feeling1 = input()
feeling2 = input()
feeling_list.append(feeling1)
feeling_list.append(feeling2)
# test if 3 feelings are entered
if feeling_number == 3:
feeling1 = input()
feeling2 = input()
feeling3 = input()
feeling_list.append(feeling1)
feeling_list.append(feeling2)
feeling_list.append(feeling3)
print('Thank you for sharing your feelings with us today. Here is what you entered {}'.format(feeling_list))