I&C SCI 31 Lecture Notes - Lecture 17: Firstclass, Blue Sky Mine, Blue Sky Mining

73 views4 pages

Document Summary

## icstunes: a music manager from collections import namedtuple. Album = namedtuple("album", "id artist title year songs") # id is a unique id number; artist and title are strings; year is a number, # the year the song was released; songs is a list of songs. # track is the track number; title is a string; length is the number of. # seconds long the song is; play_count is the number of times the user. # has listened to the song music = [ Song(7, "my head sounds like that", 389, 1), Album(2, "simple minds", "once upon a time", 1985, Song(2, "all the things she said", 256, 10), Song(6, "i wish you were here", 282, 12), Song(8, "this place is a prison", 234, 9), Album(5, "the rolling stones", "let it bleed", 1969, Song(9, "you can"t always get what you want", 448, 10)]) print(music) def song_print (s:song) -> none:

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents