0

Write a program to calculate the amount that will result from the doubling to understand which choice results in a larger amount

Write a code to print this tast

4th Jan 2023, 8:29 AM
SHIVANSH PANDEY
SHIVANSH PANDEY - avatar
4 odpowiedzi
+ 1
The task description seems incomplete to me. Could you please give a complete task description? Also it is unclear which programming language you are using. Please tag the relevant programming language instead of "print". Sololearn is not a code writing service. We don't do your homework for you but we can help you with your own code.
4th Jan 2023, 9:42 AM
Lisa
Lisa - avatar
4th Jan 2023, 10:06 AM
SHIVANSH PANDEY
SHIVANSH PANDEY - avatar
0
#doubles the numbers, then checks which one is higher, just like your description, I suppose? num1 = 8 num2 = 7 def double_it(x, y): x*=2 y*=2 if y>x: print(str(y) + " is higher than " + str(x)) else: print(str(x) + " is higher than " + str(y)) double_it(num1, num2)
4th Jan 2023, 10:20 AM
🍇 Alex Tușinean 💜
🍇 Alex Tușinean 💜 - avatar