Python Variables WorksheetPrint | Save
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:
Decide on the message you would like to display to the screen. Some ideas include:
Your favorite book title or TV show and why you like it
A few sentences sharing information about you
Your favorite sport and team or athlete
Use two variables to store your message.
Insert your pseudocode here:






Part 2: Code the Program
Use the following guidelines to code your program.
Use the Python IDLE to write your program.
Using comments, type a heading that includes your name, today’s date, and a short description.
Set up your def main(): statement. (Don’t forget the parentheses and colon.)
Use at least two variables and two print statements to display your message to the screen.
Conclude the program with the main() statement.
Follow the Python style conventions regarding indentation in your program.
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?

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.



Part 4: Save Your Work
Don't forget to save this worksheet. You will submit it for your assessment.
Print | Save

Answers

Answer 1
Answer:

Answer:

Pseudocode:

define func main

accept two parameters

create two variables from those parameters

v1 = title

v2=message

print v1, v2

returns None

call the func including the two arguments

Code:

def main(p1, p2):

""" this is a docstring, the function accepts two parameters p1 and p2 and prints them out"""

____title = p1

____message = p2

____print(title)

____print(message)

main()

Reminder

this didnot include the comment you are to add about your name, date and details

-- comments are placed after a pound sign (#)

also "____" the dashes behind the variables are not indentation just empasising them, as they are done with either by

  • Tab Button - pressed once
  • Space Bar - pressed four times

NEVER MIX THEM CHOOSE AN INDENTATION STYLE AND STICK TO IT

Finally the call function doesn't have a colon called as a nomal object, just as the print funtion also you may include the dicstring if neccessary.

DONT FORGET THE REVIEW QUESTIONS


Related Questions

What type of tool would be used to tighten a nut or bolt with an exact amount of twisting force?a. Torque wrench b. Torx wrench c. Open-end wrench d. Box-end wrench
When an attacker attempts to get credit card numbers using telephone and voice technologies, it's calleda. Vishing b. Telephishing c. Phreaking d. Voicing
Computer privacy typically occurs when which of the following is violated?a. intellectual property b. open source software c. blog post d. computer hardware
Bytes are arrangements ofa. two bits. b. eight bits. c. one hundred bits. d. one million bits.
HELPPPPP !!!!!!!!!!!

What is the central unit of the computer that contains the logic circuitry and carries out the instructions of the computer's programs called?

Answers

Well, it's called Central Processing Unit, or CPU.

Is there is anyone knows how to use matlab program ?

Answers

I'm currently learning how to use it , comment me what it is you need to know and I hope I'd be able to help

Answer:

Explanation:

MATLAB is a programming language and software platform for numerical computing, data analysis, and visualization. To use MATLAB, you can perform the following steps:

  • Start the MATLAB software: To start MATLAB, double-click the MATLAB icon on your computer or launch it from the Start menu.
  • Write and run code: To write and run code in MATLAB, you can use the MATLAB command window or create a script or function. In the command window, you can type commands and immediately see the results. In a script or function, you can write a series of commands that are saved in a file and can be run later.
  • Plot data: MATLAB provides many functions for plotting and visualizing data, including line plots, scatter plots, histograms, and 3D plots. You can use these functions to visualize and analyze your data.
  • Use built-in functions: MATLAB provides many built-in functions for solving mathematical problems, including linear algebra, optimization, and statistics. You can use these functions to perform complex computations and analysis.
  • Import and export data: MATLAB provides functions for importing and exporting data from and to various file formats, including CSV, Excel, and MAT-files. You can use these functions to read data from external sources and save results in a format that can be easily shared with others.

These are just a few of the many ways to use MATLAB. Whether you're a beginner or an advanced user, MATLAB provides a wide range of capabilities for numerical computing, data analysis, and visualization.

Example:

Here's a simple example of how to use MATLAB to plot a sine wave:

% Define the x-axis values

x = 0:0.1:10;

% Calculate the sine values

y = sin(x);

% Plot the sine wave

plot(x,y)

% Label the axes

xlabel('x (radians)')

ylabel('sin(x)')

% Add a title to the plot

title('Sine Wave Plot')

This code defines the x-axis values from 0 to 10 with increments of 0.1. It then calculates the sine values for each x value using the sin() function. The plot() function is used to create a line plot of the sine wave, with x values on the x-axis and y values on the y-axis. The xlabel() and ylabel() functions are used to label the x and y axes, respectively, and the title() function is used to add a title to the plot.

This is a very simple example, but it demonstrates the basic steps involved in using MATLAB to plot data. Whether you're working with simple plots or complex computations, MATLAB provides a powerful platform for data analysis and visualization.

_____________________________________________________

I hope this information is helpful. I mostly prefer MyAssignmentHelp.com for Matlab help. Please let me know if you have any additional questions or refer to MyAssignmentHelp.com for further assistance.

Coal is formed in which of the following depositional environments?A. A glacier
B. A swamp
C. A beach
D. A river channel

Answers

The accumulation of physical, chemical, and biological characteristics and processes involved in the deposition of sediments that result in a distinctive group of sedimentary rocks is known as a depositional environment. Thus option B is correct.

What coal formed in swamp depositional environments?

A chemical sedimentary rock mostly composed of carbon is coal. It is created from the leftovers of plants that once flourished in wetlands with plenty of muck, water, trees, and shrubs.

Because of this, the local flora produces organic matter rapidly—in fact, more rapidly than it can decompose. In certain locations, organic material builds up in layers that are eventually buried.

Therefore, coal is formed in a swamp depositional environment.Coal first forms in swampy wetlands where the groundwater level is close to or just above the topsoil.

Learn more about Coal here:

brainly.com/question/28318766

#SPJ5

What types of storage can be used to access your data on another computer

Answers

Cloud storage. If the information is on a server, you can access the data from another computer.

A way to minimize technical problems with your computer

Answers

Fix issues before they become a problem. Remember to back up your computer, Don't wait until the last minute. You could also buy Mcafee to protect your computer. Replace old equipment. Or you could look for a expert.

What is the final result of the expression 7/2 + 6?0
O
9.5
9
o
0.875

Answers

Answer:

Choice A

  • 9.5

Explanation:

There's one way to solve this problem.

\displaystyle  \cfrac{7}{2}  + 6

Re-rewrite +6 as 6/2.

\sf =  \cfrac{7 }{2}  +  \cfrac{6}{1}

Now solve for LCM of the two denominators, 2&1:

  • 2 * 1
  • 2

Then, solve.

=  \cfrac{7 + 12}{2}

=  \cfrac{19}{2}  =  \boxed{9.5}

Choice B.

#TogetherWeGoFar

Regards, Hannah