“Python cara mencetak input” Kode Jawaban

Input Pengguna Python Print

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

Python cara mencetak 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!
mauro medina

Cetak input dalam 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)
ig - thecoder.ashish

Jawaban yang mirip dengan “Python cara mencetak input”

Pertanyaan yang mirip dengan “Python cara mencetak input”

Lebih banyak jawaban terkait untuk “Python cara mencetak input” di Python

Jelajahi jawaban kode populer menurut bahasa

Jelajahi bahasa kode lainnya