Python Variables Worksheet
Output: Your Goal
You will write a program to store a message in two variables, then print that message.
Part 1: Plan and Write the Pseudocode
Write an algorithm using pseudocode that someone else can follow. Choose one of the following options:
1. Decide on the message you would like to display to the screen. Some ideas include:
1. Your favorite book title or TV show and why you like it
2. A few sentences sharing information about you
3. Your favorite sport and team or athlete
2. Use two variables to store your message.
Insert your pseudocode here
1. DECLARE variable show
2. DECLARE variable reason
3. SET show TO "Stranger Things"
4. SET reason TO "I love the blend of mystery and 80s nostalgia."
5. PRINT "My favorite TV show is " + show + " because " + reason
1. DECLARE variable name
2. DECLARE variable hobby
3. SET name TO "Alifya
4. SET hobby TO "I enjoy playing game and go out on weekends."
5. PRINT "My name is " + name + ". " + hobby
1. DECLARE variable favoritesoprt
2. DECLARE variable favorite team
3. SET favoriteSport TO "Basketball"
4. SET favoriteTeam TO "Los Angeles Lakers"
5. PRINT "My favorite sport is " + favoriteSport + " and my favorite team is " + favoriteTeam + "."
Part 2: Code the Program
Use the following guidelines to code your program.
1. Use the Python IDLE to write your program.
2. Using comments, type a heading that includes your name, today’s date, and a short description.
3. Set up your def main(): statement. (Don’t forget the parentheses and colon.)
4. Use at least two variables and two print statement to display your message to the screen.
5. Conclude the program with the main() statement.
6. Follow the Python style conventions regarding indentation in your program.
7. Run your program to ensure it is working properly. Fix any errors you may observe.
Example of expected output: The output below is an example of a “Favorite TV Show” message. Your
specific results will vary depending on the choices you make about your message.
Output
My favorite TV show is MythBusters.
I like it because I learn a lot and they do
crazy experiments.
When you've completed writing your program code, save your work by selecting 'Save' in the Python IDLE.
When you submit your assignment, you will attach this Python file separately.
Part 3: Post Mortem Review (PMR)
Write two to three sentence responses to all the questions in the PMR chart.
Review Question Response
What was the purpose of your program?
To no the variable
How could your program be useful in the real world?
Yes to rember
What is a problem you ran into, and how did you fix it? No I did not understand the code so I
asked for help my sister help me
Describe one thing you would do differently the next time you write a
program. More variables
Part 4: Save Your Work
Don't forget to save this worksheet. You will submit it for your assessment.