2. Output

  • The print() function allows you to output something to the screen
  • Text must be enclosed in “”
  • \n and \t are escape characters. Make sure you understand what they do
print(“Hello World”)
print(“Hello\nWorld”)
print(“H\tE\tL\tP”)
print(3+4)

Tasks

  1. Create programs to…
    1. print your name three times, separated by a space
    2. draw Robbie the robot
    3. print the number table
  2. Save and label your programs

Extension

It is possible to print the number table with only a single print() statement. Can you write the code?