Backlog

Module-Tools πŸ”—  

Expand all

Mandatory Tasks

These tasks will help consolidate your learning for this sprint. You should complete as many of these as possible before class on Saturday.

Prep Exercises πŸ”— Clone

Prep Exercises πŸ”—

Task code

CYF-1155 - make sure to include this in your PR title or description.

https://sdc.codeyourfuture.io/tools/sprints/5/prep/

Why are we doing this?

Read the prep and do all of the exercises in it.

Maximum time in hours

5

How to submit

Submit a pull request to this repo from your fork, containing a single Python file per exercise.

Optional Tasks

These are optional "stretch goals" to attempt when you have finished the mandatory tasks. They may be more challenging or require some additional research.

Radio Control App πŸ”—

Radio Control App πŸ”—

Learning Objectives

Task code

CYF-1208 - make sure to include this in your PR title or description.

Radio Control App

This is part of an app that can be used to control an online radio station

Your task is to:

  1. Add type annotations where appropriate.
  2. Upgrade everything use dataclasses. Use frozen where appropriate.
  3. Observe how the given __str__ method works, and add one to the other classes
  4. When the __str__ method is called, have it print the duration in formatted mm:ss rather than just seconds
  5. Add a new class of Person - you can use your imagination what this includes, but it should have at least a string name
  6. Turn the fields for artists, host, and guest into Person classes
  7. Make a new class Podcast that extends the TalkShow class, with an extra string field for sponsor
  8. Finish implementing the class Playlist, and set it to takes a generic, e.g. either Song or TalkShow or Podcast

As you implement, make sure to keep checking with mypy and add your own code at the end to test it works correctly