Answered step by step
Verified Expert Solution
Question
1 Approved Answer
years = 2 months = 5 days = 2 4 #You may modify the lines of code above, but don't move them! #When you Submit
years
months
days
#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 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 years, give them a
# dog dog
# If you've been dating for at least year but less than
# years, give them a watch watch
# If you've been dating for at least months but less than
# year, give them concert tickets concert tickets"
# If you've been dating for at least a day but less than
# 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 :
printdog
elif years :
printwatch
elif months :
printconcert tickets"
elif days :
else:
print candy
printyacht
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started