Learn Alice in FREE step-by-step lessons.
Module 10: User Input in Alice3
In this module, you will learn create an interactive program.
Your program will ask the user his name and then make a 3D character say "hello" using the name they entered.
Goals:
- Learn how to get input from the user
- Store those values in variables
- Ask the user for information such as his name and age
- Use that information later in the program
Objectives:
- Select and use functions to ask the user a question and store the result.
- Use functions to get information from the user.
- Use stored values in the code.
- Use input from users in the code.
Please study the material at each of the links below.
Ask the users name and say hello: Use the function getStringFromUser to ask the user his name, then say hello using the name entered.
Ask the user how old they are: Use the function getIntegerFromUser to ask the user's age.
Ask the users their favorite food: Wolf asks "What's your favorite food?", then says that is his favorite too.
Panda asks how much to turn: We ask the user for a double and the panda spins around that amount.
Martian asks if he is on Mars: We ask the user for a Boolean value.- Martian asks if he is on earth: We ask the user for a Boolean value, and use an if statement for the value
Self Study Questions: What have you learned?
Active Learning: Practice what you learned
Discussion questions: What do you think?
Glossary for user-input lesson
Full Glossary