xxxxxxxxxx
input = input("Enter your value: ")
print(input) # prints the input
xxxxxxxxxx
name = input("Hi! What’s your name ? ")
print("Nice to meet you " + name + "!")
age = input("How old are you ? ")
print("So, you are already " + str(age) + " years old, " + name + " !")
xxxxxxxxxx
#basic user handling for begginers
x = input("your question here") # when someone types something here that answer will be saved and be used for later
# for example
print(x)
xxxxxxxxxx
# Take user input in python
age = int(input("Type the age: "))
if age <= 18:
print("You are too young to enter here")
xxxxxxxxxx
string = input("Enter a string: ")
number = int(input("Enter a number: "))
xxxxxxxxxx
# Taking string input
a = input("Enter a string: ")
print("String is: ", a)
# Taking integer input
b = int(input("Enter an integer: "))
print("Integer is: ", b)
# Taking float input
c = float(input("Enter a float value: "))
print("Float value is: ", c)