CSCI 101 - Intro to Computer Science

Python Lab

Quick Links: zyBook | Piazza | Canvas | CS @ Mines

Home | Contact | Schedule | Assignments | Syllabus |

Python Lab 1A: Your Favorite Shape!
Due Tuesday, September 7th, by 11:45pm


Introduction

Welcome to your first Python lab in CSCI 101! This lab, as well as Lab 1B, need to be submitted to Gradescope by the due date. You will submit each lab separately, as a single .py file. For those NOT in CSCI 102, check out the CSCI 102 website to see what was covered (if needed).

To get started, open IDLE and then create a New File via the File menu. We suggest you immediately save this file in some directory you create that you will use to store/manage all your Python Labs this semester (e.g., CSCI101/PythonLabs). Save this file as Lab1A-shape.py.

Assignment

Section 14.5 in your zyBook talks about ASCII Art. Your goal in this lab is to create your favorite shape using ascii art. Here is a simple example:

 Hello! My name is John Henke, and my favorite shape is a connected double-diamond:

     /\        |        /\
    /  \       |       /  \
   /    \      |      /    \
  /      \_____|_____/      \
  \      /     |     \      /
   \    /      |      \    /
    \  /       |       \  /
     \/        |        \/

Goodbye!

Note the blank lines before and after the ASCII Art, to set off the shape on the screen. Include these lines in your solution and, again, save your Python code in the file Lab1A-shape.py.

We encourage you to be way more creative than this simple example! In fact, we will give a prize to the student with the best ASCII Art showing their favorite shape in each section.

For 102 students: normally you'll want to complete Studio and the CSCI 102 lab assignments before the CSCI 101 labs. That is not needed for this lab.

For the advanced Python student: challenge yourself by using loops to print certain parts of your shape.

Comments

All Python files should include a header with your name, section, assignment info, references (i.e., who did you collaborate with on this assignment?; what resource did you use?), and approximate time taken to do the assignment. Be sure to cite any allowed external references used to complete the assignment. Any code without this header will lose 1 point. Here's an example:
        #   John Henke
        #   ​CSCI 101 – Section F
        #   Python Lab 1A
        #   References: my roommate Jane Doe helped me find a missing ")"
        #   Time: 30 minutes

Submission

Once you are satisfied with your solution to this lab, you need to submit the file to Gradescope. In Gradescope, go to Assignments > Lab1A and upload Lab1A-shape.py. Unlike other labs, this lab does not have any Gradescope autograder test cases.

Note: this lab is worth 1 point. To receive credit, your code must execute in Python 3, you must submit a single file (your Python code file), and you must have the input/output match the lab requirements.

Whenever you submit something to Gradescope, we strongly recommend you always double check what you submitted actually got submitted correctly (e.g., did the file upload correctly? did you submit the correct file? etc.) If your submission is incorrect, it's on you.



Valid HTML 4.01 Strict Valid CSS! Level Triple-A conformance, W3C WAI Web Content Accessibility Guidelines 2.0