This is a log of my time learning python through Udemy’s 100 days of coding course.

So far I have completed:

Day 8

This day was hard. I struggled getting back into it as I had to take a week break for other things. I learned how to use definitions, function with inputs, functions with positional arguments, functions with keyword arguments, and crucially what a parameter is vs an argument.

Day 7

Day 7 was pretty tough. I had to come back to it a couple days later. With this code I learned how to import and use variables from other modules, use for loops and while loops nested with if statements. One particular thing in this that I didn’t know how to do was end a while loop once the man was hung or I successfully found the word. To do this, I had to set up a termination variable. In the case, that variable is “end_”

It took me a while to completely figure out the correct hierarchy for all the loops and conditionals. I would run into issues where the number of guesses would count down for each time the guessed letter occurred. I had to make multiple conditional statements and separate out each branch to successfully have the program read and show correctly.

Day 6

I had a lot of fun learning python on this day. I learned how to create definitions and while loops. Reeborg’s World was used to test my scripts and figure out how to test for the goal and test for each movement as the robot went along. Being a visual person, seeing how the robot would move in each step really helped me.

Jumping hurdles of variable heights test.

Day 5

This final challenge of the day really stumped me, and I had to do a lot of research. I didn’t know how to start. I knew I needed to print an input number of characters, but I was unsure how to limit the number of loops. Turns out, since range outputs integers, it will give the number of reps. Since nr_letters was also an integer I just needed to add 1 to it so that it printed the correct number of values since python starts counting at 1. From there it was fairly easy to understand until making the password randomized.  For randomizing the output password, I had to put the output into a list. For this I was trying to transform a string into a list. I was getting confused here. Another way was to change the password variable at the beginning to a list, that way I didn’t need to convert it later. So I did this. I had to look up how to shuffle this list. I found random.shuffle(). How do I print this as a string though? I didn’t know how to do this and eventually watched the tutorial. Looks like it was just another ForLoop that takes a final string variable and adds each character in the string to it. Looks like I have some more understanding to go in terms of what these loops can do.

This FizzBuzz challenge was confusing for me, I figured if I put the statement for a number divisible by both 5 and 3 by using the modulo anywhere it would automatically put fizzbuzz. I was wrong…..I had to put it at the top so it would check for that first!!!!

For this challenge I had to find the highest score from a series of inputs. To do this, I had to use a ForLoop of the scores input into a list and compared one value with the next in the list. Once the loop went through everything in the list, choosing the greatest one and replacing the highest variable, the final highest score was output.

Learning about loops. the first exercise was to use loops to find the average of student heights input.

Day 4

Rock, Paper, Scissors – in this exercise I learned data format management and how to translate an input string into an integer, and link it back to a set of options in a list. Something in particular I struggled with here was how to output “invalid” if the user did not put in either rock, paper, or scissors. This had to do with the nested conditional statements, which took me a while to figure out what was wrong.

For this buried treasure placement exercise, I was really confused on how to access the nested list. It ended up just being how the code is read! Once you enter into the first list with a line of code, the next line of code will interpret it within the first list.

This “who pays the bill” exercise required the input of a number of names. The number of names could be variable, so I needed to calculate the number of inputs by asking the input to be separated by commas. Once the input is split up by the commas, I used len() to count the number and assign a number. Then, I imported a random module, used that to randomly select a person by number, then printed the name from the input list that corresponded this number.

This exercise taught me how to import modules, use, and manipulate random values.

Day 3

This day was long, but i definitely learned a ton. I learned how to use conditional statements, nest conditional statements, how to manipulate data sets from strings to others like floats or integers. Primitive logic trees in the context of a text game. How to calculate the total cost of a pizza given certain conditional inputs. Created a “True Love” game in which it counted the number of characters in your name and a crush’s that coincided with the letters in “true love”, then interpreted that number, combined it, then read it as a value to give you an arbitrary test on how compatible someone is with another. I also learned how to manipulate logic operators such as “if,” “and,” and “not.” Below are some screen caps of my work.

Day 2

content coming soon

Day 1

On my first day of “100 days of Coding,” I learned some basic functions in python such as print, input, len, variable manipulation, what a string is, and how to print a string of information that includes text and variables with breaks in the text to show it on a new line in the console. I am using to learn.

error: Content is protected !!