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

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 12:00, anamatiascamaja
If you embed a word table into powerpoint, what happens when you make edits to the embedded data? a. edits made to embedded data change the data in the source file; however, edits made to the source file will not be reflected in the embedded data. b. edits made to embedded data will change the data in the source file, and edits made to the source file will be reflected in the embedded data. c. edits made to embedded data don't change the data in the source file, nor will edits made to the source file be reflected in the embedded data. d. edits made to embedded data don't change the data in the source file; however, edits made to the source file will be reflected in the embedded data.
Answers: 1
image
Computers and Technology, 23.06.2019 16:00, lokaranjan5736
Write a grading program for a class with the following grading policies: a. there are two quizzes, each graded on the basis of 10 points. b. there is one midterm exam and one final exam, each graded on the basis of 100 points. c. the final exam counts for 50% of the grade, the midterm counts for 25%, and the two quizzes together count for a total of 25%. (do not forget to normalize the quiz scores. they should be converted to a percentage before they are averaged in.) any grade of 90 or more is an a, any grade of 80 or more (but less than 90) is a b, any grade of 70 or more (but less than 80) is a c, any grade of 60 or more (but less than 70) is a d, and any grade below 60 is an f. the program will read in the student’s scores and output the student’s record, which consists of two quiz and two exam scores as well as the student’s average numeric score for the entire course and final letter grade. define and use a structure for the student reco
Answers: 2
image
Computers and Technology, 24.06.2019 03:00, firenation18
Click the "draw structure" button to activate the drawing utility. draw two diastereomers of (1z,4r)−1,4−dimethylcyclodecene and name them, including (e)/(z) and (r)/(s) notation. part 1 out of 4 draw the diastereomer containing a chiral center with s configuration here. window open
Answers: 1
image
Computers and Technology, 24.06.2019 09:00, king514
Technician a says that a new replacement part is always good. technician b says that sometimes recent repair work will be the cause of a complaint. who is correct? a. both technicians a and b b. technician a c. technician b d. neither technician a nor b
Answers: 3
You know the right answer?
The Power of If Worksheet
Output: Your goal
You will write a program that asks a user...

Questions in other subjects:

Konu
Mathematics, 28.01.2021 17:10
Konu
Mathematics, 28.01.2021 17:10