Python Day 33 – more elif

Went further into if/elif/else statements, which is looking to be very useful to a potential choose your own adventure code game I’m thinking of making. Learned that you can pack elif statements within a larger elif which allows for multiple potential trails of code depending on the variables. Par example… when in conversation with aContinue reading “Python Day 33 – more elif”

Python Day 32 – elif and a bug fix

I reviewed elif statements which are useful when you have more than two potential actions depending on an input. You just use them in between your “if” and “else” statements and can put however many you want! Neat stuff. Also finally figured out how to fix it when Jupyter notebooks stops running code and hasContinue reading “Python Day 32 – elif and a bug fix”

Python Day 31 – control flow ideas

Today was an exciting one. Learned some control flow stuff which has me thinking about the possibilities of making an interactive story with Python… I learned: Python, different than other programs, just uses indented blocks of code to signify some relations (apparently other codes use actual {} or other syntax stuff?). Also, whenever a lineContinue reading “Python Day 31 – control flow ideas”

Python Day 30 – finishing up strings

I finished the intro to strings portion of the Udemy course today! It mostly covered formatting stuffs… I learned: When using {} to call a field number there are a ton of little things one can do to format the output. For instance, to have a 4 spaces in the result use {:4} which canContinue reading “Python Day 30 – finishing up strings”

Python Day 29 – mixing strings and numbers

Continued the Udemy intro course which covered some more string operators and replacement fields. I learned: If you make a list of string items, you can call the index of an item and then call a specific character within that item by putting two brackets back to back (ex: mylist[1][3]). You can multiply lists orContinue reading “Python Day 29 – mixing strings and numbers”

Python Day 28 – strings strings strings

More contextual string knowledge acquired! I learned: You can use math operations within the [brackets] of strings to call for an index position! For instance string[5*2] and string[12-2] and string[10] all produces the same thing. That actually kinda excites me. Other than that today was just more practice with slicing and steps in strings. IContinue reading “Python Day 28 – strings strings strings”

Python Day 27 – String Indexing

This morning I went over indexing strings. Learned to print only certain letters of a text with the brackets[]. This was a pretty short basic refresher as I still have one final exam left (tomorrow!). I broke down “Norwegian Blue” to say “we win” with a new letter for each line with this code: parrotContinue reading “Python Day 27 – String Indexing”

Python Day 26 – variables and operators

Continued my journey on this intro Udemy course. The videos I watched today mostly helped cement some contextual understanding of how Python works… I learned: A variable is created whenever you set “some text” = “anything else, like an int or str or float”. Also apparently in Python it’s a little bit more useful toContinue reading “Python Day 26 – variables and operators”

Python Day 25 – some new basics

Today I started an intro course in Udemy which turned out to be pretty useful as it’s easy to forget some of the basics. I learned: You can do math directly within print()! Before I was writing a = 5*5 print(a) #but now print(5*5) It feels obvious now but it’s these little things that makeContinue reading “Python Day 25 – some new basics”

Python Day 24 – functions and datatypes

I started out today trying to do some HackerRank numpy array challenges, but quickly realized that I have a lot more to learn before I should do them. I understood the concept but the syntax was killing me. So I watched a basic YouTube video and learned a few lil things. I learned: Float64 andContinue reading “Python Day 24 – functions and datatypes”