*This notebook includes final Homework which is already updated (new problems are added) and upgraded (existing problems were slightly tuned) after covering new material on 27/July/2017.
Problem 1 - Superify 1 (2 points)
For this problem create a list of 5 strings (e.g. a list consisting of words like men, women, cool etc.). Create a for loop that will iterate over the elements of the list. If the current element has more than 4 characters, then print that element after adding the prefix super and a space: e.g. superwomen. For all other cases (less than or equal to 4 characters) print that element adding the prefix super without any space: e.g. supercool.
Problem 2 - Stockplotter 1 (2 points)
Create a list of 5 stocks. Use pandas_datareader to download the data on those stocks and plot the opening price for all 5 of them inside one single plot.
Problem 3 - Stockplotter 2 (1 point)
Define a function that will get only one argument: stock. Once the argument is given the function must download that stock's data from Google Finance and plot it.
Problem 4 - Listpop (2 points)
While append() is a function used to add an element to the list, pop() is a function (again available only for lists) that is used to delete an element. For example, if we have a list my_list = ['a','b','c','d'], then my_list.pop(2) will delete the 2nd (in Python terminology) element of the list: 'c'. Similarly, my_list.pop(-1) will delete the very last element of it: 'd'. The remaining list after those two operations will be my_list = ['a','b'] Create a while loop, that will delete elements from the stock list in Problem 2, as long as the list is not empty (i.e. the while loop must stop once the stock_list becomes empty). Note: make sure not to create an infinite loop.
Problem 5 - Numlength 2 (4 points)
Create a list of positive integers with different digits (some one digit, some two digits, some three etc.). For each element in this list check whether that integer has one, two or three (or four, if you have it in your list) digits. The one digit elements to be written into a new list called one_digit, two digit elements into a list called two_digits and so on.
Problem 6 - Superify 2 (2 points)
Solve problem 1 with a while loop.
Problem 7 - Descriptive Analytics (3points)
Choose one stock to get data on. Based on your data: