Welcome to your first programming assignment! This week you'll complete 5 small Python problems to practice the fundamentals.
Complete ALL of the following problems from CS50P Week 0:
- Indoor Voice - Convert text to lowercase
- Playback Speed - Replace spaces with ellipses
- Making Faces - Convert emoticons to emoji
- Einstein - Calculate E=mc²
- Tip Calculator - Calculate tip and total
Full problem specifications: https://cs50.harvard.edu/python/psets/0/
Execute cd by itself in your terminal window. You should find that your terminal window's prompt resembles the below:
$
For each problem, you'll follow this same pattern. Here's an example for the first problem:
mkdir indoorcd indoorYou should now see your terminal prompt as indoor/ $
code indoor.pyThis will open a new file where you'll write your program.
Follow the same pattern for all five problems:
indoor→indoor.pyplayback→playback.pyfaces→faces.pyeinstein→einstein.pytip→tip.py
When you've completed all five problems:
- Test each program thoroughly
- Commit your changes:
git add .thengit commit -m "Complete Week 0" - Push to GitHub:
git push
Your submission will be automatically recorded when you push to your repository.
- Review the problem specifications carefully
- Test your code with the examples provided
- Use
print()statements to debug - Ask for help if you're stuck!
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/tipSubmit 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