sexta-feira, 22 de novembro de 2019

Inputs

Hello, MiniScripters!
Today you'll learn about inputs and outputs. The difference between they is:
Inputs are strings that the player types in the prompt; they pass data to the program, like "print "Hello World!"".
Outputs are strings that the program prints. They pass data to the user.
Now that you know the basic about inputs and outputs, let's start. We will make a program that asks the name, the age and the favorite food of the user, then print a record with all this information.

With MiniMicro

Step 1



Type  "name = input("Hi! What's your name?")"

Step 2



Type "age = input("And what's your age?")"

Step 3



Type "food = input("What's your favorite food?")"

Step 4



Now let's make a pretty record, with the user's personal data;

Type:
print "_________________"
print "Name:   " + name"
print "Age:   " + age"
print "Favorite food:   " + food
print "_________________"

And our program is done,ready for running.
Don't forget to type "save"! Now just type "run" and test your program.When you answer all the questions the program will make, it must to look like this:

Of course, you must to have typed some other name or age, or favorite food, but the result is basically this. Now you can make program using inputs and outputs. These are super important things in a game; inputs and outputs. It's the post of today, bye! See you later!

Nenhum comentário:

Postar um comentário