+ 3
Is there any way to have input from output of python code and recall the code for next?Orshow text for what input is being taken
I e - I have py code to calculate perimeter & area and show nature of traingle for that I needed 3 inputs as sides of traingle in 3 different lines but I couldn't tell it directly. Although people can see how to input from my code. Another code is to calculate temperature I needed input temp but I cannot tell it directly?
5 Respuestas
+ 7
The input() function can accept one optional argument:
input ('prompt')
However, the Sololearn Python compiler is not interactive so the prompt will not be displayed. You can include instructions on how to enter input in the comments at the beginning of your code.
+ 5
StuartH ,
when a different `ide` is required to avoid input issues from playground, we do not need to install anything.
> try to use replit.com which is an online ide for several programming languages. apart of the website mentioned there are apps (from replit) for android and maybe also for apple ios that we can use.
+ 4
Yes, use the prompt in input.
side1 = input("Enter 1st side: ")
+ 3
In Python you can accept multiple inputs one at a time from the user with prompts as to what information you need them to enter. The Sololearn codespace can only accept the inputs all at once on separate lines and cannot display prompts one after the other and also wont show your prompt information to the user.
To practice what you're trying to do, you'll need a standalone Python IDE. You can download these for free on desktops, android and ios easily.
+ 1
Good tip, thanks. I like the convenience of having it installed but I get that some people might not!