Computers and Technology
Computers and Technology, 25.11.2020 01:00, 2019jbash

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.

answer
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 08:10, autumnguidry1622
Technician a says that if a valve is open when a piston rises to the very top of a cylinder, the piston may actually strike the valve head and cause serious engine damage. technician b says if the camshaft is located in the engine block, then the engine is called an overhead valve engine, ohv engine, or an in-block camshaft. who is right? a. b only b. both a and b c. a only d. neither a nor b
Answers: 3
image
Computers and Technology, 23.06.2019 18:30, emmaishere69
List 3 items that were on kens resume that should have been excluded
Answers: 1
image
Computers and Technology, 24.06.2019 01:00, arturocarmena10
The initial tableau of a linear programming problem is given. use the simplex method to solve it. x 1 x 2 x 3 s 1 s 2 z 1 2 4 1 0 0 8 3 4 1 0 1 0 10 minus3 minus12 1 0 0 1 0 the maximum is nothing when x 1equals nothing, x 2equals nothing, x 3equals nothing, s 1equals3, and s 2equals0. (be sure to simplify to lowest terms if necessary.)
Answers: 2
image
Computers and Technology, 24.06.2019 12:50, neptunesx
Write a new lc-3 trap subroutine (i. e. a subroutine that will be invoked via the trap instruction) that will receive a numeric digit entered at the keyboard (i. e. an ascii character), echo it to the screen, and return in r0 the corresponding numeric value: so if the user types the digit '7', the character '7' will appear on the screen, but the value returned in r0 will be b0000 0000 0000 0111 (#7) you may not use any trap calls in your code - you must implement the "polling" code that interrogates the keyboard status and data registers. ; getnum_tsr ; a subroutine for obtaining a numeric value ; given ascii numeric digit input to keyboard. ; the numeric digit is echoed to the console (e. g. '7' = b0000 0000 0011 0111), ; but the value returned in r0 is the actual numeric value ; corresponding to the digit (e. g. b0000 0000 0000 0111 =
Answers: 3
Do you know the correct answer?
The Power of If Worksheet
Output: Your goal
You will write a program that asks a user...

Questions in other subjects:

Konu
Mathematics, 19.03.2020 00:02