Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialRigby Adams
1,231 PointsWhen I run the program it multiplies the physical number i have inputted by 10. E.G if i input 5 it comes out with 10 5s
Above Question p.s. how do i add a picture of my code??
3 Answers
Pedro Cabral
33,586 PointsYou’ll need to cast your input to an int, for example: print(int(input())*10)
Scott Bailey
13,190 PointsTo add your code click on the "Markdown Cheatheet" button below the box you type in and look for the header "code"
Benjamin Perrault
3,331 PointsI'm having the same issue. I noticed it's solved by separating out the coercion step from the input step, which is odd because I thought they could be combined on one line.
Example 1 gives me the input 10 times when calculated: tickets_requested = int(input("How many tickets would you like, {}? ".format(name)))
Example 2 gives me the input multiplied by 10 (the ticket price) when calculated: tickets_requested = input("How many tickets would you like, {}? ".format(name)) tickets_requested = int(tickets_requested)