Exercises 01

Record videos of your programs running by using MS Stream and save the video into the videos folder. Make the view appear at the bottom of this page.


Reading and Changing

Use the Books dictionary for this set of exercises

  1. Write a function called readBookTitle() that takes the following parameters:
    • books dictionary
    and prints out the title of each book along with the ISBN to the console.

  2. Write a function called readBookAuthor() that takes the following parameters:
    • books dictionary
    and prints out the author of each book along with the title to the console.

  3. Write a function called readBookPublisher() that takes the following parameters:
    • books dictionary
    and prints out the publisher of each book along with the title and author to the console.

  4. Write a function called changeBookTitle() that takes the following parameters:
    • books dictionary
    • the index of the book to change as an integer
    • the new title of the book as a string
    Use the function readBookTitle() TWICE in the main routine to printout the and prints out the title of each book BEFORE and AFTER the changes.

  5. Write a function called changeBookauthor() that takes the following parameters:
    • books dictionary
    • the index of the book to change as an integer
    • the new publisher of the book as a string
    Use the function readBookPublisher() TWICE in the main routine to printout the and prints out the title of each book BEFORE and AFTER the changes.



Put your evidence here: