Essential Question: How can I format text in python?
Mastery Objectives:
SWBAT format text to tab and indent text.
SWBAT use the print command.
SWBAT create a variable.
Do Now: Open trinket.io or repl.it and setup an account with your google email. Create a new program and type the following:
import this
Run your program and read the results.
Directions: Write a Python program to print the following string in a specific format:
Twinkle, twinkle, little star,
How I wonder what you are!
Up above the world so high,
Like a diamond in the sky.
Twinkle, twinkle, little star,
How I wonder what you are
\n creates a new line
\t indents text
print('\n You are my sunshine, \n \t My only sunshine.')
Would print out as:
You are my sunshine,
My only sunshine.
About Me Assignment Tutorial: https://projects.raspberrypi.org/en/projects/about-me