A New Program
Now that you've reviewed the basics of Python programming, you'll create a program that can tell your user a story, but only if they know the secret password! 1. Before you write the code, plan out a story.
2. Create a new project called "UserStory".
3. Write a 6–8 line story that you'll use for the rest of the project.
Here are seven lines about a happy dragon who becomes sad:
- Once upon a time, there was a happy dragon.
- The dragon lived by the sea.
- He ate trees and bushes.
- People thought the dragon was too happy.
- The people sent Geoff, the village's butcher, to fight the dragon.
- The dragon thought that sounded unpleasant, so he left the sea.
- Now he lives in the city and eats the trees and bushes there instead.
print() to print the first line of your story to the console window:
print("First line of your story")
Continue to use print() to send the remaining lines of your story to the console window.
Write the story about something important to you. It doesn't have to be dragons, it could be a diary about your day or something you just make up!
Plan out a short story. Use print() commands to print your story line by line.
print("First line of your story")
Use escape characters in a creative way to format your story the way you want.
