How to input(input() ) | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How to input(input() )

Please explain to me if somebody know

7th Dec 2020, 9:22 AM
Hlaingboar
Hlaingboar - avatar
1 Answer
0
variable = input( ) #you assign/store the user's input in a certain variable var = input( ) #takes input as string var = int(input( )) #takes input as an integer var = float(input( )) # takes input as float But note that if you input string or words in int(input ( )) and float(input( )), It will cause an Error. By the way, Use the search bar next time first to see if a question has been already asked, that way its easier and faster. Good Luck! Review this lesson if you are still confused about the topic. Happy coding. https://www.sololearn.com/learn/JUMP_LINK__&&__Python__&&__JUMP_LINK/2426/
7th Dec 2020, 9:27 AM
noteve
noteve - avatar