Question: years = 2 months = 5 days = 2 4 #You may modify the lines of code above, but don't move them! #When you Submit

years =2
months =5
days =24
#You may modify the lines of code above, but don't move them!
#When you Submit your code, we'll change these lines to
#assign different values to the variables.
#Ever been at a loss for what to do for your significant
#other for Valentine's Day? Let's right some code to generate
#a gift recommendation!
#
#The variables above give Coding Problem 3.2.1 le relationship in
#number of years, months, allu uays. muu some code below to
#print a gift recommendation based on these values:
#
# - If you've been dating for at least 4 years, give them a
# dog ("dog").
# - If you've been dating for at least 1 year but less than
# 4 years, give them a watch ("watch").
# - If you've been dating for at least 6 months but less than
# 1 year, give them concert tickets ("concert tickets").
# - If you've been dating for at least a day but less than 6
# months, give them candy ("candy").
# - If aren't actually dating, go big or go home: give them
# a yacht to sail away together ("yacht").
#Note that no matter what, you should only print one gift.
#Add your code here!
if years 4 :
print("dog")
elif years 1 :
print("watch")
elif months 6 :
print("concert tickets")
elif days >=1 :
else:
print ("candy")
print("yacht")
 years =2 months =5 days =24 #You may modify the lines

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!