+ 2
Input in python solvings
So basically i was solving a problem where i wrote something like pcount=input() brushcost=40 pcost=pcount*5 sumcount= 40 + pcost tax=(10*sumcount)/100 paintsolve=sumcount-tax It told me that pcount is a str, not int, and i was trying to make smthing likr adding str and int Did i just do input wrong? ( i was off from python for a while)
2 Réponses
+ 9
input will always give you a string type, you need to convert it to a number.
pcount = int(input())
+ 3
Of course! My bad, sorry, thank you!