Basic Commands - 1
This page will show you basic Python commands
Now that you've created a repl.it account, you'll need to know some basic commands in Python to be able to successfully create a Text Adventure Game.
Today, I will show you those commands and you'll be doing some practice to make sure that you've got the skills down.
COMMAND 1: PRINT()
Our first and most crucial command is the print() command. In order to print any text, the print() command is used. Whenever you use print() commands, you need to use quotations ("") in order for your words to be recognized and printed as text.
Example:
Now you try. I would like you to print out what you did today and call me over to check. Once I approve, you may move on to the next command.
COMMAND 2: \n
"\n" is what we call an escape character instead of creating separate print statements to put things on new lines like
we can use \n to reduce the amount of code.
Example of using an \n command:
Now you try. I would like you to print out your favorite animal, food, and music artist using the escape character "\n." Once you're done, call me over to check. Once I approve, you may move on to the next page.
Last updated