CJCoding With Joseph
15free / daySign inCreate account
TitleTopicsAction
476
Student AverageFinish the `Student` class: the constructor already stores `name` and `grades` a...
easy○ Not Started
Classes
Solve
477
Eligible For HonoursAn `HonourStudent` is a `Student` (is-a), so the subclass passes `name` and `gra...
easy○ Not Started
ClassesInheritance
Solve
478
Rectangle AreaThe `Rectangle` constructor stores `width` and `height` as floats. Write the bod...
easy○ Not Started
Classes
Solve
479
Rectangle PerimeterThe `Rectangle` constructor stores `width` and `height`. Write the body of `peri...
easy○ Not Started
Classes
Solve
480
Deposit Into The AccountA `BankAccount` stores an `owner` and a `balance`. Write the body of `deposit` s...
easy○ Not Started
Classes
Solve
481
Withdraw Or RefuseA `BankAccount` stores an `owner` and a `balance`. Write the body of `withdraw`:...
easy○ Not Started
Classes
Solve
482
Introduce A PersonA `Person` stores a `name` and an `age`. Write the body of `describe` so it prin...
easy○ Not Started
Classes
Solve
483
Count Every InstanceA class attribute belongs to the class itself, not to any one object, so `Counte...
easy○ Not Started
Classes
Solve
484
Distance Between PointsA `Point` stores `x` and `y`. Write the body of `distance_to`, which receives an...
easy○ Not Started
Classes
Solve
485
Degrees In FahrenheitA `Temperature` stores `celsius` as a float. Write the body of `to_fahrenheit` s...
easy○ Not Started
Classes
Solve
486
Degrees In CelsiusA `Temperature` stores `fahrenheit` as a float. Write the body of `to_celsius` s...
easy○ Not Started
Classes
Solve
487
Dog Says WoofA `Dog` is an `Animal`, so it inherits `speak`, which prints `<name> makes a sou...
easy○ Not Started
ClassesInheritance
Solve
488
Cat Keeps The SoundA `Cat` is an `Animal` with one extra attribute, `indoor`. Write the body of the...
easy○ Not Started
ClassesInheritance
Solve
489
Push Onto The PileA `Pile` keeps its values in a list attribute called `items`, newest last. Write...
easy○ Not Started
Classes
Solve
490
Pop Off The PileA `Pile` keeps its values in a list attribute called `items`, and `push` already...
easy○ Not Started
Classes
Solve
491
Add Minutes To The ClockA `Clock` stores `hours` (0 to 23) and `minutes` (0 to 59). Write the body of `a...
easy○ Not Started
ClassesOperators
Solve
492
Book Summary LineA `Book` stores a `title`, an `author` and a whole number of `pages`. Write the ...
easy○ Not Started
Classes
Solve
493
Add A Book To The LibraryA `Library` is not a kind of `Book`; it HAS a list of them in the attribute `boo...
easy○ Not Started
Classes
Solve
494
Stock Up The InventoryAn `Inventory` keeps a dict attribute `stock` that maps an item name to a quanti...
easy○ Not Started
Classes
Solve
495
How Many In StockAn `Inventory` keeps a dict attribute `stock` from item name to quantity, and `a...
easy○ Not Started
Classes
Solve
496
Car OdometerA `Car` stores its `make`, an `odometer` reading in km and a `trips` count that ...
easy○ Not Started
Classes
Solve
497
Student Report LineA `Student` stores `name` and `grades`, and `average` is already written. Write ...
easy○ Not Started
Classes
Solve
498
Square CheckA `Rectangle` stores `width` and `height`. Write the body of `is_square` so it r...
easy○ Not Started
Classes
Solve
499
Scale The RectangleA `Rectangle` stores `width` and `height` and already has `area`. Write the body...
easy○ Not Started
Classes
Solve
500
Temperature ReportA `Temperature` stores `celsius` and already has `to_fahrenheit`. Write the body...
easy○ Not Started
Classes
Solve
501
Deal The Last CardA `Deck` builds its `cards` list in the constructor with two nested loops, one o...
easy○ Not Started
Classes
Solve
502
Card LabelA `Card` stores a `rank` such as `Q` or `10` and a `suit` such as `Hearts`. Writ...
easy○ Not Started
Classes
Solve
503
Enrol In The CourseA `Course` is not a kind of `Student`, so it does not inherit from it; instead i...
easy○ Not Started
Classes
Solve
504
Move The PointA `Point` stores `x` and `y`. Write the body of `move` so it shifts the point in...
easy○ Not Started
Classes
Solve
505
Pile Pop And SizeWrite the whole `Pile` class. The constructor takes no arguments and creates an ...
medium○ Not Started
Classes
Solve
506
Remove From StockWrite the whole `Inventory` class. The constructor creates an empty dict attribu...
medium○ Not Started
Classes
Solve
507
Clock With RolloverWrite the whole `Clock` class for a 24-hour clock. The constructor takes `hours`...
medium○ Not Started
ClassesOperators
Solve
508
Class Average Of A CourseThe `Student` class is given. Write the whole `Course` class: a course is not a ...
medium○ Not Started
Classes
Solve
509
Animals That SpeakWrite three classes. `Animal(name)` stores `name` and has `speak()`, which print...
medium○ Not Started
ClassesInheritance
Solve
510
Points That Move And MeasureWrite the whole `Point` class. The constructor stores `x` and `y` as floats; `mo...
medium○ Not Started
Classes
Solve
511
Freezing Point CheckWrite the whole `Temperature` class. The constructor stores `celsius` as a float...
medium○ Not Started
Classes
Solve
512
Rectangle ReportWrite the whole `Rectangle` class. The constructor stores `width` and `height` a...
medium○ Not Started
Classes
Solve
513
Account That Refuses OverdraftsWrite the whole `BankAccount` class. The constructor stores `owner` and a float ...
medium○ Not Started
Classes
Solve
514
Numbered TicketsWrite the whole `Ticket` class so every ticket gets the next number in sequence....
medium○ Not Started
Classes
Solve
515
Find A Title In The LibraryThe `Book` class is given. Write the whole `Library` class: the constructor crea...
medium○ Not Started
Classes
Solve
516
Student Report CardWrite the whole `Student` class. The constructor stores `name` and `grades` (a l...
medium○ Not Started
Classes
Solve
517
Ticking TimerWrite the whole `Timer` class. The constructor stores `seconds` as a whole numbe...
medium○ Not Started
Classes
Solve
518
Drive With FuelWrite the whole `Car` class. The constructor stores `make` and `fuel` (litres, a...
medium○ Not Started
Classes
Solve
519
Line Between Two PointsThe `Point` class, with `distance_to`, is given. Write the whole `Line` class: a...
medium○ Not Started
Classes
Solve
520
Stock ReportWrite the whole `Inventory` class. The constructor creates an empty dict attribu...
medium○ Not Started
Classes
Solve
521
Honour StudentWrite two classes from scratch. `Student(name, grades)` stores `name` (a string)...
hard○ Not Started
ClassesInheritance
Solve
522
Deck Of CardsWrite two classes from scratch. `Card(rank, suit)` stores both strings and has `...
hard○ Not Started
Classes
Solve
523
Library CatalogueWrite two classes from scratch. `Book(title, author, pages)` stores the two stri...
hard○ Not Started
Classes
Solve
524
Account With A HistoryWrite the whole `BankAccount` class from scratch. The constructor stores `owner`...
hard○ Not Started
Classes
Solve
525
Top Of The CourseWrite two classes from scratch. `Student(name, grades)` stores `name` and `grade...
hard○ Not Started
Classes
Solve