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

How to input in python

4th Jan 2021, 3:31 PM
Aci Baskso
Aci Baskso - avatar
4 Answers
+ 3
# String x = input() # Integer x = int(input()) # Float x = float(input()) Note that the user's input is assigned in its variable, here the inputs are assigned in variable "x" For more, continue your course as it will be discussed in your next module. Happy Coding!
4th Jan 2021, 3:38 PM
noteve
noteve - avatar
+ 2
Name_of_variable = type(input("What do you want to take ")) Types--> str() <--Converts evrything in strings int() <--Convert the automatic sting at --the input to an number. abs() <--Absolute value Etc...
4th Jan 2021, 5:00 PM
FᄂӨЯΣПᄃ BΛЯDΉI
FᄂӨЯΣПᄃ BΛЯDΉI - avatar
0
print ('....');
4th Jan 2021, 3:36 PM
Yahita O
0
Or n=input('...');
4th Jan 2021, 3:38 PM
Yahita O