Book.py example

This example shows testing your completed lab. Here we will walk through seeing owned books. This example also shows how you should handle invalid input when seeing owned books.

python3 ereader.py

Since this is the first time you used it,
let's customize your Swindle...

Please enter you name: Vasanta

Welcome to Vasanta's Swindle v1.0!

--------------------------------------------------

1) Buy/See available books
2) See owned books
3) Read a book
4) Exit

   ---> 2

You don't own any books!
--------------------------------------------------

1) Buy/See available books
2) See owned books
3) Read a book
4) Exit

   ---> 2

You don't own any books!
--------------------------------------------------

1) Buy/See available books
2) See owned books
3) Read a book
4) Exit

   ---> 1
1         GettysburgAddress      Abraham Lincoln (1863)
2       Alice in Wonderland        Lewis Carroll (1865)
3       Pride and Prejudice          Jane Austin (1813)
4                 Peter Pan         J. M. Barrie (1922)
5                   Ulysses          James Joyce (1922)
6    Mary Had a Little Lamb   Sarah Josepha Hale (1830)

Which book would you like to buy? (0 to skip): 5

You've successfully purchased the book: Ulysses

--------------------------------------------------

1) Buy/See available books
2) See owned books
3) Read a book
4) Exit

   ---> 2
1                   Ulysses          James Joyce (1922)
--------------------------------------------------

1) Buy/See available books
2) See owned books
3) Read a book
4) Exit

   ---> 4