#Sam Ola
#10/10/2021
#In this lesson i learned elif
#i didnt really have any problems with this assignment
# [ ] review the code then run testing different inputs
# WHAT TO WEAR
weather = input("Enter weather (sunny, rainy, snowy): ")
if weather.lower() == "sunny":
print("Wear a t-shirt")
elif weather.lower() == "rainy":
print("Bring an umbrella and boots")
elif weather.lower() == "snowy":
print("Wear a warm coat and hat")
else:
print("Sorry, not sure what to suggest for", weather)
# [ ] review the code then run testing different inputs
# SECRET NUMBER GUESS
secret_num = "2"
guess = input("Enter a guess for the secret number (1-3): ")
if guess.isdigit() == False:
print("Invalid: guess should only use digits")
elif guess == "1":
print("Guess is too low")
elif guess == secret_num:
print("Guess is right")
elif guess == "3":
print("Guess is too high")
else:
print(guess, "is not a valid guess (1-3)")
size = input("Enter your size (S/M/L)")
if size.lower() == "s":
print("the price is $6")
elif size.lower() == "m":
print('the price is $7')
elif size.lower() == 'l':
print("8")
else:
print('please enter a valid size (S/M/L)')
weight1 = '60' # a string
weight2 = 170 # an integer
# add 2 integers
total_weight = int(weight1) + weight2
print(total_weight)
str_num_1 = "11"
str_num_2 = "15"
int_num_3 = 10
total_num = int(str_num_1) + int(str_num_2) + int_num_3
print(total_num)
str_num_1 = "11"
str_num_2 = "15"
int_num_3 = 10
total_num = int(str_num_1) + int(str_num_2) + int_num_3
print(int(total_num))
str_integer = "2"
int_number = 10
number_total = int(str_integer) + int_number
print(number_total)
# [ ] review and run code
student_age = input('enter student age (integer): ')
age_next_year = int(student_age) + 1
print('Next year student will be',age_next_year)
# [ ] review and run code
# cast to int at input
student_age = int(input('enter student age (integer): '))
age_in_decade = student_age + 10
print('In a decade the student will be', age_in_decade)
num_adding = int(input('enter 1 numbers'))
num_adding2 = int(input('enter another number'))
num_added = num_adding + num_adding2
print(num_adding, '+', num_adding2, 'equals', num_added)