0
Input
So I wrote a little scrip to determine thing life income, tax, expences, profit, etc. of a company based on their production. The user is promted to input the number of priducts made, but when I type it into the console, the program will not work unless I input the number twice. Does anyone know why this is happening or how I can tix it? Thanks for the help
5 Answers
+ 2
That's it!
You are printing the first message asking for an input but this is not stored. But then you are correctly storing it (asking another input). So you can assign Widgets to the first line and erase the second one :)
Another way is to "print" the first line instead "input" and let the second line how it is.
+ 1
I am sure you have two "input()" in your code, and maybe one of them doesn't do anything. Can you show us your code please? We can help you more efficiently seeing it :)
+ 1
Ah ok thanks for the help:)
0
Here is what I wrote:
input("How many widgets were made?\n")
Widgets = int(input())
(Widgets is my variable for the number of products)
0
Do you need to see more of the code or is that enough?