0
How to make 6 18 and 6 instead of 33 99 and 33
x = input('Enter a number from 2 to 10 : ') print(x) y = abs(int(x + x)) print(y) t = abs(int(y * 3)) print(t) f = abs(int(float(t) / float(x))) print(f) OUTPUT Enter a number from 2 to 10 : 3 33 99 33
1 Antwort
+ 1
Try converting to integer BEFORE the sum. Your x + x is concatenating strings, instead of summing numbers.