Python Day 35 – you can not a boolean??

Today my Udemy course went more in depth with “and” and “or” inside if statements. I learned that one can use greater than (>) or less than (<) signs to determine whether a line prints, and that you can combine multiple of these together. I also learned that you can put “not” in front ofContinue reading “Python Day 35 – you can not a boolean??”

Python Day 34 – making a decision tree

Today I started doing some groundwork for a potential mini narrative choose your own adventure coded story. I got stuck for a bit trying to figure out what story to write, but then decided that it was better to just start writing something very rough to practice the coding. So here’s the super random codeContinue reading “Python Day 34 – making a decision tree”

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”