Question: why wont my total cost print? full code: Newbie here, wondering why my totalcost wont calculate weight = () hours = () days = ()

why wont my total cost print? full code: Newbie here, wondering whywhy wont my total cost print?

full code:

Newbie here, wondering why my totalcost wont calculate

weight = () hours = () days = () category = () dailyrate = () hourlyrate = ()

for i in range(1): name = input("Name") weight = int(input("dog weight")) hours = int(input("hours dog is staying")) days = int(input("days dog is staying"))

if weight >=0 and weight

elif weight >=20 and weight

elif weight >=50 and weight

elif weight >=100: Category = 4 print("Category 4")

if category == 1: hourlyrate = 8 dailyrate = 30 weeklyrate = 150 totalcost = (dailyrate * days + hours * hourlyrate)

elif category == 2: hourlyrate = 9 dailyrate = 35 weeklyrate = 160 totalcost = (dailyrate * days + hours * hourlyrate)

elif category == 3: hourlyrate = 10 dailyrate = 40 weeklyrate = 175 totalcost = (dailyrate * days + hours * hourlyrate)

elif category == 4: hourlyrate = 12 dailyrate = 45 weeklyrate = 200 totalcost = (dailyrate * days + hours * hourlyrate)

if days

else: totalcost = (weeklyrate + (days - 7) * dailyrate + hours * hourlyrate) print('the cost of stay is: ' , totalcost)

#the totalcost calculation is currently printing an empty value when it should calculate based on the test case

Google has suggested i try the return function but its gotten more complicated for me with that. Everything else is running fine except the total cost calculation prints empty parentheses and doesnt actually calculate

Command Line Arguments 24 days dog is staying 1 Category 2 >_ the cost of stay is: () ** Process exited - Return Code: 0 ** Press Enter to exit terminal

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!