This Is Quiz 1

Hello! This is Quiz 1. This quiz is designed to test your knowledge of the structures, syntax and terminology you've learned from Week 1.

The quiz consists of a Python file where each function is a question. The answers will be given in the return values, which will be formatted as directed in the questions' docstrings.

Before You Begin

Turn off all LSPs, Linters, and Autocompletion help if using a local IDE. We strongly recommend using the Codespace and/or disabling any extra tools for this exercise to make the most of the opportunity.

[!NOTE] Double quotes cannot be used inside of double quoted strings without being escaped.

Execute cd by itself in your terminal window. You should find that your terminal window’s prompt resembles the below:

1
$
Next execute
1
mkdir quiz1
to make a folder called quiz1 in your codespace.

Then execute

1
cd quiz1
to change directories into that folder.

You should now see your terminal prompt as quiz1/ . You can now execute

1
wget https://github.com/alum-challenges/problems/raw/refs/heads/main/python/week-1/quiz1/quiz1.py
to download the Quiz 1 program. Then execute
1
code quiz1.py
to edit the file called
quiz1.py` where you’ll answer questions in the form of a Python program via the return values.

Specification

The specification for each function is in each docstring for the functions provided.

Do not edit the function's structures. Dummy data has been provided to demonstrate the format. Each function's return value must match the format in the directions.

Hints

Check out the str documentation: https://docs.python.org/3/library/stdtypes.html#str

List of built-in functions: https://docs.python.org/3/library/functions.html

More about functions: https://docs.python.org/3/tutorial/controlflow.html#defining-functions

How to Test

You can execute the below to check your code using check50, a program that CS50 will use to test your code:

1
check50 alum-challenges/problems/main/python/week-1/quiz1/tests
If you run into an error saying your file cannot be opened, retrace your steps to be sure that you are inside your quiz1 folder and have saved your quiz1.py file there.

Quizzes will not tell you what answer is expected, only which questions you failed.

How to Submit

Coming soon