1#Collecting The Input As A Variable:#
2name = input('Please enter your name: ')
3#Printing The Variable:#
4print(name)
5#Checking The Variable And Printing Accordingly:#
6if name == 'Joe':
7 print('Joe Mama')
1name = input("What is your name?\n") # Asks the user 'What is your name?' and stores it in the 'name' variable
2
3print("You said your name was " + name)
4
5number = int(input("Please select a random number:\n")) # Will get input as a number
6# Will error if the value entered is not a number
7
8# You can use any type of conversion (int(), bool(), float(), etc.) to modify your input
9
10
1#basic user handling for begginers
2
3x = input("your question here") # when someone types something here that answer will be saved and be used for later
4
5# for example
6print(x)
1# Taking string input
2a = input("Enter a string: ")
3print("String is: ", a)
4
5# Taking integer input
6b = int(input("Enter an integer: "))
7print("Integer is: ", b)
8
9# Taking float input
10c = float(input("Enter a float value: "))
11print("Float value is: ", c)
12
1make_a_variable_name = input("Put whatever question, or prompt as Python calls it, that the person will answer here.")