- 1
Why does it come up with 12525 rather than 25?
bill = int(input(125)) (bill*20/100)
4 Answers
+ 3
bill = int(input())
+ 2
input() takes parameters of what should be printed to console before getting user input.
So basically your code first prints "125" Then gets input, makes calculations and outputs "25.0"
So you end up with "12525.0"
To fix that just remove "125" from input() function arguments.
bill = int(input())
(bill*20/100)
+ 1
Oliver Brown
Use print() function to output:
bill = int(input())
print(bill*20/100)
0
Thanks,but it doesn't complete the lesson because I get no output.