Відповідь:
x = int(input("Enter the number of patties Chucky eats per day: "))
u = int(input("Enter the number of patties Cherry eats per day: "))
chucky_weight = 1.5 # kg
cherry_weight = 2.5 # kg
weight_difference = cherry_weight - chucky_weight # kg
patty_weight_gain = 0.1 # kg
patties_to_gain_weight = weight_difference / patty_weight_gain # number of patties
days_to_catch_up = patties_to_gain_weight / (x - u) # days
if x <= u:
print("Chucky cannot catch up with Cherry.")
else:
print("It will take Chucky", days_to_catch_up, "days to catch up with Cherry.")
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
Відповідь:
x = int(input("Enter the number of patties Chucky eats per day: "))
u = int(input("Enter the number of patties Cherry eats per day: "))
chucky_weight = 1.5 # kg
cherry_weight = 2.5 # kg
weight_difference = cherry_weight - chucky_weight # kg
patty_weight_gain = 0.1 # kg
patties_to_gain_weight = weight_difference / patty_weight_gain # number of patties
days_to_catch_up = patties_to_gain_weight / (x - u) # days
if x <= u:
print("Chucky cannot catch up with Cherry.")
else:
print("It will take Chucky", days_to_catch_up, "days to catch up with Cherry.")