Exercise 1: Implement a fibonacci function.
Exercise 2: Print the five most used words from a book.
For better results, it is useful to remove the most common words in the language the book was written in (these are called "stop words").
Some tips:
- Save the book content in a variable
- Split the book by their words
- Make pairs by word appearance/frequency
- Sort and print
Hints:
... # Output example: # [whale 81] [whales 26] [sea 21] [some 19] [up 17]
# Load the full book content from the web into the `full-book` constant
# total length 643063 chars
# Take only a part of the full-book in order to speed the execution example.
# Create a vector using all words from the book
# Create a set with the common words that you want to filter out
# To each word
# Output:
# [whale 81] [whales 26] [sea 21] [some 19] [up 17]
Exercise 3: Create the "Rock, paper, scissors!" game.
Requirements:
- The program computes a random letter (the computer-guess).
- The cli-app ask you for a letter "r", "p" or "s" (the player-guess).
- The logic for the game is world known [wikipedia]. Each of the three beats one of the other two, and loses to the other.
- Print the result of logic with the winner in the console.
Hints:
# First, declare some constants according to the program domain
# Infinite loop till Ctrl+C to kill the program :)