veriska
0
Q:

accept user input in python

name = input("Enter your name: ")

#Printing the variable (name)
print("hello",name)
4
# if you want to ask the user to input anything, use the keyword "input"

# example

a = input("What is your name") # the user will be prompted to answer the question 

print(a) # this allows the user to actaully see the question or anything
3
user = input("yes, no\n")
0
#Take Integer Value
nval=int(input("Enter a number : "))
#Take String Value
sval=input("Enter a string : ")
#Take float value
fval=float(input("Enter a floating-point number : "))
0

New to Communities?

Join the community