Lab 1 – Input / Output

Write a Python program that prints output, gets user input, and uses variables.

Lab Description

Print a quote using escape characters. Get user input for the date and print a message to the user with tomorrow’s date.

Steps

  1. In PyCharm (Community Edition), open your existing ITP115 project. If you do not have a project, then create a new project in PyCharm. This project can be anywhere on your computer that is convenient to access such as in your Documents folder or on your Desktop.
  2. Under the Labs directory, create a new Python file called lab1_last_first.py where last is your last/family name and first is your preferred first name. Use all lowercase letters. If you do not have a Labs directory, then create a new directory in PyCharm in your ITP115 project.
  3. At the top of the file, put comments in the following format and replace the name, email, and section with your actual information:
  1. # ITP 115, Fall 2022
  2. # Section: number or nickname
  3. # Lab 1
  4. Call the print function and use escape characters to display the following quote:

“Do your little bit of good where you are; it’s those little bits of

good put together that overwhelm the world.” – Desmond Tutu

You may call the print function one or multiple times.

This content is protected and may not be shared, uploaded, or distributed.

ITP 115 2022-08-20

  1. Ask the user for the day of the week, month, and the date. Store each answer in a variable. Make sure to convert the date to an integer. Print a message with the day of the week, today’s date, and tomorrow’s date. You are not expected to make this work for all dates. If the date entered is the last day of the month, you do not need to update the month. The user input is shown in green text.
  2. Enter the day of the week: Tuesday
  3. Enter the month: August
  4. Enter the date: 30

Today is Tuesday, August 30. Tomorrow will be August 31.

  1. Upload the Python file named lab1_last_first.py to your Blackboard section: o On Blackboard, navigate to the appropriate item.
    o Click on the specific item for this lab.
    o Click on the Browse Local Files button and select the file.

o Click the Submit button.

Additional Notes

  • Each lab is worth 1 point. To earn the point, make sure your program runs correctly and that you submit it correctly.

ITP 115 2022-08-20 Sample Output

“Do your little bit of good where you are; it’s those little bits of good put together that overwhelm the world.”
– Desmond Tutu

Enter the day of the week: Tuesday

Enter the month: August

Enter the date: 30

Today is Tuesday, August 30. Tomorrow will be August 31

 


    Customer Area

    Make your order right away

    Confidentiality and privacy guaranteed

    satisfaction guaranteed