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
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
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
b. providing a forum to discuss actors/actresses
c. criticizing high-profile individuals
d. promoting all body types
The media communicates unrealistic body image through various ways, which are mentioned in the available options for the question. It definitely digitally alters images that they use for their various publications, and it also provides forums to discuss actor and actresses, including their looks.
The media also often criticizes high-profile individual’s current body condition – whether they are too underweight or too overweight. Thus, the best answer for the question would be (D) promoting all body types.
•Minimum of one terabyte hard drives
•Minimum of 5 GB RAM
•Windows XP, Linux, or Mac OSX
The management of the store wants to upgrade four of the computers and use them to process client orders. The initial study done by the management reveals that the computers will perform the following tasks:
•Run an order-processing application that requires a multiprocessing operating system. The application will take orders from customers over the Internet, process the orders, and create invoices.
•Communicate with customers using e-mail to resolve customer queries.
•Store customer data on the local computer. The store will use this data to promote new products.
The department store needs you to upgrade the four computers. Find the necessary equipment from online vendors to upgrade the computers
Answer:
The solution code is written in Python:
m = 1
n = 5
d = random.randint(m, n)
Explanation:
To get a random integer between m and n inclusive, we can make use of Python randint method. It will take two parameters, m and n. By giving two integers as an input (e.g. 1 and 5) to randint, it will generate a random integer between 1 to 5 inclusive.