0

Paint post problem (whats the problem?

x=int(input()) y=x*5 z=int((40+y)*10)/100 k=float((40+y)*10)/100 if z>k: print (int(40+y+z)) else : print (int(40+y+k))

8th Jan 2022, 6:03 PM
Mh Shawon
Mh Shawon - avatar
3 Réponses
0
Idk what you are trying. But if you use the same formula for z and k, the condition z>k becomes never true. Variable z is always equal k.
8th Jan 2022, 6:43 PM
Coding Cat
Coding Cat - avatar
0
And you should maybe not change the question after a answer. This looks like you got stupid answers from someone.
8th Jan 2022, 7:39 PM
Coding Cat
Coding Cat - avatar
0
Now it looks like this: x is always integer y is always integer z is always integer k has always the same value as z, but is now a float. So a '.0' is added to the end. So z will never be greater then k. It's always the same value. One as int and one as float.
8th Jan 2022, 7:58 PM
Coding Cat
Coding Cat - avatar