+ 1

How does input work in python ?

Can someone explain please!! No seen please!

28th Apr 2019, 2:30 PM
JohnSia2005
1 Odpowiedź
+ 7
How the input function works in Python : When input() function executes program flow will be stopped until the user has given an input. The text or message display on the output screen to ask a user to enter input value is optional i.e. the prompt, will be printed on the screen is optional. Whatever you enter as input, input function convert it into a string. if you enter an integer value still input()function convert it into a string. You need to explicitly convert it into an integer in your code using typecasting. source: https://www.geeksforgeeks.org/taking-input-in-python/ sololearn tutorial on python3 input function: https://www.sololearn.com/learn/Python/2426/ Also remember: Before asking a question on the Q/A, try to search... to avoid from posting duplicate threads!   ⇨ Follow community RULES: https://www.sololearn.com/Content-Creation-Guidelines/ https://code.sololearn.com/W26q4WtwSP8W/?ref=app
28th Apr 2019, 2:46 PM
Alessio Benvenuti
Alessio Benvenuti - avatar