Skip to content

Latest commit

 

History

History

w2

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

Week 2

Day 1

Question of the day: How would you write a program to make correct change (as in a cashier giving you coins, not changing the world)?

  • Writing tests with pytest
  • Exceptions

Exercise

Pig Latin

Assignment

Currency converter

ERRATA:

  • rates is a list of tuples, not a dictionary.
  • from is a reserved word, so use original or _from for the parameter indicating the currency to change from.

References

Day 2

Question of the day: How would you write a program to find all the anagrams of a phrase?

  • Creating classes and objects

Exercise

Cipher

Homework

Object-oriented money

Day 3

Question of the day: What classes would you need to make a blackjack game? How would you calculate the score for a hand?

Goals

  • Object-oriented design

Homework

Pig

Day 4

Question of the day: How would you write a program to recommend items someone might like to buy, given their purchase history, like on Amazon?

Goals

  • Pipenv and third-party libraries
  • Reading and parsing data

Homework

Pathfinder

References