Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

python print user input

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 + " !")
Comment

python how to print input

#To print user input, take the input from the user and store it as a variable. For example I named the variable "name" because that is the question the user will answer.
name = input("What is your name?")
#Then enter in a print command to actually print the user input. Change the "name" variable to the variable you named it.
print("Nice to meet you," + name)
#Feel free to copy and paste the code and edit it to your liking. Hope this helped!
Comment

print input in python

# Take input from user and store it as a variable. E.g. I store the input as 'user_inp'
user_inp = input("Enter anything you want: ")

#Now you can print it by using print function
print("You entered ", user_inp)
# If you don't want "You entered " you can simply write as:- print(user_inp)
Comment

PREVIOUS NEXT
Code Example
Python :: install python 3.8 on wsl 
Python :: Invalid password format or unknown hashing algorithm. 
Python :: pandas do not display index 
Python :: openpyxl read sheet row by row 
Python :: get source code selenium python 
Python :: captions overlap in seaborn plot jupyter 
Python :: reset index in pandas 
Python :: python binary search 
Python :: python pandas how to get the dataframe size 
Python :: regex for repeating words python 
Python :: concatenate string and int python 
Python :: iterate through directories in python 
Python :: python squared math function 
Python :: hungry chef solution 
Python :: even numbers in python 
Python :: temp python web server 
Python :: turn columns into one column as list python 
Python :: make a label using tkinter in python 
Python :: how to check if a variable in python is a specific data type 
Python :: Delete python text after 1 sec 
Python :: install poetry on linux 
Python :: django signals post_save not working 
Python :: check if string equals string in list python 
Python :: pyaduio linux 
Python :: bubble sort with code optimization 
Python :: pip install mod_wsgi error 
Python :: rust vs python 
Python :: python show map with coordinates 
Python :: sort dictionary by key 
Python :: plotting in python 
ADD CONTENT
Topic
Content
Source link
Name
7+7 =