Answers for "python capture input"

3

how to accept input from the user in python

# 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
Posted by: Guest on June-13-2020
0

python output and input

>>> x = 5; y = 10
>>> print('The value of x is {} and y is {}'.format(x,y))
The value of x is 5 and y is 10
Posted by: Guest on October-25-2021
0

python output and input

print('I love {0} and {1}'.format('bread','butter'))
print('I love {1} and {0}'.format('bread','butter'))
Posted by: Guest on October-25-2021

Python Answers by Framework

Browse Popular Code Answers by Language