def main(): welcome() answer=input('next task? ') while answer =! 'quit': if answer=='recommend': recommend() elif answer=='best': best() elif answer=='add': add() elif answer=='quit': quit() answer=input('next task? ') def welcome(): print('Welcome to the CSC110 Book Recommender. Type the word in the') print('left column to do the action on the right.') print('recommend : recommend books for a particular user') print('best : the book with the highest rating among all users') print('add : add a new book') print('quit : exit the program')
Run
Reset
Share
Import
Link
Embed
Language▼
English
中文
Python Fiddle
Python Cloud IDE
Follow @python_fiddle
Browser Version Not Supported
Due to Python Fiddle's reliance on advanced JavaScript techniques, older browsers might have problems running it correctly. Please download the latest version of your favourite browser.
Chrome 10+
Firefox 4+
Safari 5+
IE 10+
Let me try anyway!
url:
Go
Python Snippet
Stackoverflow Question