JUPYWHAT — CODE1161_wk09

EXAMS. Jupysomething.


Was relatively easy. If I had more time, I would have finished the exam. A few new functions, but in the end, relatively easy.

I got half of the exam passing, so that’s good. I was panicking until Ishaan or Aiden reminded me it’s only 5%.

I got 61% for the exam. ¯\_(ツ)_/¯

New things I learned or relearned from the exam:

1. %, modulo

The code that worked

I spent hours (exaggeration) kind of stuck on this one. I have been doing this rather that what I ended up above.

fizzBuzzlist = []
for i in range(1, 101):
if i == i % 3:
elif i == i % 5:
elif i == i % 15:
return fizzBuzzlist

Two things you will notice, ONE. i == i % 3: does not mean anything, but what you want is to tell python that when i % 3 == 0 or when a number is dividable by 3 and the result is 0, then return “Fizz”. TWO. I placed i % 15 == 0 first in the final test because I wanted above any other rule (i % 3 and i % 5) I want multiples of 15 to result in “FizzBuzz” then everything else after that a “Fizz” or “Buzz”.

2. .count

.count counts the amount of occurrence a string or integer or character appears.


So, I haven’t touched jupyter since week 7, and when I opened terminal, how do I run jupyter?

How to open Jupyter: type jupyter notebook on terminal…

This is what happens when you don’t write down notes on jupyter, you forget stuff.

My attention span is not that great. 10 minutes into trying to code, I went and did something else. I was looking at iloc for a while though. Here are the link I find useful on pandas.

On .iloc, .loc, and .ix

On .read_csv()

On .plot()

That’s it for now. Sleep then get ready for class tomorrow.