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
4 Antworten
+ 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.
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)