Skip to main content Link Menu Expand (external link) Document Search Copy Copied

Lab 1: Control and Functions

Due at: 2024-06-13 11:59:59 PM PST
  1. Q1: Sample Question
  2. Q2: Another Question

Q1: Sample Question

This is a sample question description.

def sample_question(a, b, c):
    """
    >>> another_question(1, 2, 3)
    6
    >>> another_question(0, 0, 0)
    0
    >>> another_question(3, 0, 0)
    3
    """
    # BEGIN SOLUTION
    return a + b + c
    # END SOLUTION

Use Ok to test your code:

python3 ok -q sample_question

Q2: Another Question

This is another sample question description.

def another_question(a, b, c):
    """
    >>> another_question(1, 2, 3)
    6
    >>> another_question(0, 0, 0)
    0
    >>> another_question(3, 0, 0)
    3
    """
    # BEGIN SOLUTION
    return a + b + c
    # END SOLUTION

Use Ok to test your code:

python3 ok -q another_question

Submission

When you are done, submit your file to Gradescope. You only need to upload the following files:
  • lab01.py
  • another_file.py
You may submit more than once before the deadline; only the final submission will be graded. It is your responsibility to check that the autograder on Gradescope runs as expected after you upload your submission.