Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

Week 0: Functions, Variables

Welcome to your first programming assignment! This week you'll complete 5 small Python problems to practice the fundamentals.

Assignment Overview

Complete ALL of the following problems from CS50P Week 0:

  1. Indoor Voice - Convert text to lowercase
  2. Playback Speed - Replace spaces with ellipses
  3. Making Faces - Convert emoticons to emoji
  4. Einstein - Calculate E=mc²
  5. Tip Calculator - Calculate tip and total

Full problem specifications: https://cs50.harvard.edu/python/psets/0/

Before You Begin

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

$

Starting Each Problem

For each problem, you'll follow this same pattern. Here's an example for the first problem:

Step 1: Create a folder

mkdir indoor

Step 2: Navigate into the folder

cd indoor

You should now see your terminal prompt as indoor/ $

Step 3: Create your Python file

code indoor.py

This will open a new file where you'll write your program.

Repeat for Each Problem

Follow the same pattern for all five problems:

  • indoorindoor.py
  • playbackplayback.py
  • facesfaces.py
  • einsteineinstein.py
  • tiptip.py

Submission

When you've completed all five problems:

  1. Test each program thoroughly
  2. Commit your changes: git add . then git commit -m "Complete Week 0"
  3. Push to GitHub: git push

Your submission will be automatically recorded when you push to your repository.

Getting Help

  • Review the problem specifications carefully
  • Test your code with the examples provided
  • Use print() statements to debug
  • Ask for help if you're stuck!

Testing Your Code

Before submitting, test each problem with check50:

check50 cs50/problems/2022/python/indoor
check50 cs50/problems/2022/python/playback
check50 cs50/problems/2022/python/faces
check50 cs50/problems/2022/python/einstein
check50 cs50/problems/2022/python/tip

Submitting

Submit each problem with submit50:

submit50 cs50/problems/2022/python/indoor
submit50 cs50/problems/2022/python/playback
submit50 cs50/problems/2022/python/faces
submit50 cs50/problems/2022/python/einstein
submit50 cs50/problems/2022/python/tip

About

Week 0 work for *either* CS50-Python or classic CS50

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors