It's extremely easy to grab input from the keyboard in Python:
print("Your First App v0.00001")
print("-----------------------")
x = input("Please, enter your name: ")
print("Name: ", x)
We can do some immediate calculations:
print("Your First App v0.00001")
print("-----------------------")
x = int(input("Please, enter some number: "))
print("Result: ", x + x)
And sure, use as much inputs as you need:
print("Your First App v0.00001")
print("-----------------------")
x = (input("Please, enter your Name: "))
y = (input("Please, enter your LastName: "))
print(x, y)
In next tutorial we will work with Lists. They are just collections of elements enclosed in brackets.
No comments:
Post a Comment