subject

The Power of If Worksheet
Output: Your goal
You will write a program that asks a user to answer a question, stores the response in a variable, and then prints a message based on the response.

Part 1: Plan and Write the Pseudocode
Using pseudocode, write an algorithm that someone else can follow.
1. Decide on a question to ask the user. Some ideas include:
1. What grade are you in?
2. What sport do you play?
3. Where did you go on vacation?
2. Use one variable to store the response.
3. Use one if-else statement to make a decision based on the user's input.
4. Display two messages; one for each condition (True and False).

Insert your pseudocode here: (you only need to do one)

Write it out:

Get input:

If statement:

Print if true:

Print if false:

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. Write one if-else statement using user input.
5. Include a print message for both conditions (True and False).
6. Conclude the program with the main() statement.
7. Follow the Python style conventions regarding indentation in your program.
8. Run your program to ensure it is working properly. Fix any errors you may observe.
Part 3: Post Mortem Review (PMR)
Using complete sentences, respond to all the questions in the PMR chart.
Review Question Response
What was the purpose of your program?

How could your program be useful in the real world?

What is a problem you ran into, and how did you fix it?

Describe one thing you would do differently the next time you write a program.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 00:20
What’s resistance in an electrical circuit ?
Answers: 1
question
Computers and Technology, 22.06.2019 15:00
Atool that matches persoal skills qualities interests and talets to a career is called a
Answers: 1
question
Computers and Technology, 22.06.2019 18:00
Write a method named addall that could be placed inside the hashintset class. this method accepts another hashintset as a parameter and adds all elements from that set into the current set, if they are not already present. for example, if a set s1 contains [1, 2, 3] and another set s2 contains [1, 7, 3, 9], the call of s1.addall(s2); would change s1 to store [1, 2, 3, 7, 9] in some order. you are allowed to call methods on your set and/or the other set. do not modify the set passed in. this method should run in o(n) time where n is the number of elements in the parameter set passed in.
Answers: 2
question
Computers and Technology, 22.06.2019 20:00
How is the number 372 written when expanded out to place values in the base 8 (octal) number system? a. 2 x 4 + 3 x 2 + 4 x 1 b. 3 x 64 + 7 x 8 + 2 x 1 c. 3 x 8 + 7 x 7 + 2 x 6 d. 3 x 100 + 7 x 10 + 2 x 1
Answers: 1
You know the right answer?
The Power of If Worksheet
Output: Your goal
You will write a program that asks a user...
Questions
question
Mathematics, 05.12.2020 01:10
question
Mathematics, 05.12.2020 01:10
question
Mathematics, 05.12.2020 01:20
question
Mathematics, 05.12.2020 01:20
question
Mathematics, 05.12.2020 01:20