Python Question

Description

The Assignment

Don't use plagiarized sources. Get Your Custom Assignment on
Python Question
From as Little as $13/Page

This is an easy coding assignment. The tough work you are doing here is very much behind the scenes – getting PyCharm setup and understanding the requirements and submission process.

Submit just one program, please.

Read Module 1

Modify the sample program so that it includes a docstring with the assignment title and your name.

Here’s my example of the docstring

“””
Assignment 1: Opening Lines
Submitted by Mike Murphy
Submitted: January 11, 2024

Assignment 1: This program demonstrates printing lines of text to the screen
“””
Write a function called print_header()

Write a function called print_header() that will produce this output (with your name, not mine!):

STEM Center Temperature Project
Mike Murphy

Your main() function should call this print_header function, just like the main function in our examples called print_greeting().

See the page Hello World for an example of how to write a function.

Run your code, and paste the output as a multiline string at the end of the file. Save this as Assignment-1.py and upload it to Canvas.

So – here’s what my full .py submission would look like:

“””
Assignment 1: Opening Lines
Submitted by Mike Murphy
Submitted: January 11, 2024

Assignment 1: This program demonstrates printing lines of text to the screen
“””

(python code goes here)

r”””
============ RESTART: UsersmikeDocumentsAssignment_1.py ============
STEM Center Temperature Project
Mike Murphy
>>>
“””

After you complete the preperation of the Assignment_.py file be sure to run it in PyCharm to ensure that your program still runs after you add your output to the module (the .py file)

Note:

1. The beginning and end of your output may look slightly different. You do not create the code that produces the “RESTART” or “>>>” lines, those are generated by Python as a result of running the program. Again, your output may look different.

2. If you are running you must format your multi-line output like this.

r”””

============ RESTART: UsersmikeDocumentsAssignment_1.py ============
STEM Center Temperature Project
Mike Murphy
>>>

“””

If you are running Windows you must include the “r” before the first 3 quotes in the output, it tells Python to ignore any escape characters in the multiline string. More about escape characters later, just add the r now. Better yet format your output without the “r” and see what happens.