-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathselection.py
More file actions
35 lines (30 loc) · 1.61 KB
/
Copy pathselection.py
File metadata and controls
35 lines (30 loc) · 1.61 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
29
30
31
32
33
34
35
#selection.py
# Program - Aaron Rodriguez
print('This program is a simple guessing game, you're asked a set of question and based on the response '
'the response will vary if you got one or the other correct or nether correct.')
fav_color = input('\nGuess my friends color: ')
fav_number = int(input('\nGuess my friends favor number: '))
if fav_color == 'Yellow' and fav_number == 77: # These variables can be changed to have different outputs
print("\nThat's correct! Yellow is the right favorite color.")
print('\nAnd, 7 is the correct favorite number.\n')
elif fav_number=='Yellow' or fav_number ==77:
print("\nHey, you entered the correct favorite color.")
print("Or, you entered the correct favorite number.")
print("However, you did not enter both\n")
else:
print("\nYou entered neither Yellow nor 77.")
first_number = int(input('\nPlease enter first_number: ')) # User Input
second_number = int(input('\nPlease enter second number: '))
# Based on responses output will vary using the if, elif, and else
if first_number < second_number:
print('\nAnswer {} < {}.\n'.format(first_number, second_number))
elif first_number > second_number:
print('\nAnswer {} > {}.\n'.format(first_number, second_number))
else:
print('\nAnswer {} == {}.\n'.format(first_number, second_number))
if (first_number < second_number) or (first_number > second_number):
print("\nFirst number {} is not equal to "
"Second number {}.\n".format(first_number, second_number))
else:
print("\nFist number {} is equal to "
"Second number {}.\n".format(first_number, second_number))