Week 0 Recap

CircuitCoderCircuitCoder
2 min read

Why I started CS50P?

I am in my first year of college and want to become a game developer. After doing some research, I chose Python as my first programming language and plan to move to C++ later. When I looked for resources, I found out about CS50P, and it was just what I needed.

What week 0 covered

Starting with the creation of my first program, "Hello, World," I progressed to developing my own functions. The course covered all the fundamental topics necessary for a beginner, such as Variables, Strings, Integers, and Floats. It emphasized the importance of using comments consistently to enhance understanding, not only for myself but also for anyone else who might read my code in the future. Additionally, I learned about formatting strings, which involves inserting variables into strings in a readable way, and explored various string methods that allow for manipulation and analysis of text data. This foundational knowledge has been crucial in building my confidence as I continue to learn programming.

Problem set 0 breakdown

  • Indoor Voice

  • Playback Speed

  • Making Faces

  • Einstein

  • Tip Calculator

Difficulties I faced

I encountered challenges only with "Making Faces" and "Tip Calculator"; the rest were straightforward for me.

In "Making Faces"

Problem: Scope-related error. I mistakenly used the variable as a parameter.

Solution: I corrected it by switching the variable to a parameter and then used the variable appropriately when calling the function.

The “Tip Calculator” initially presented some confusion, but I was able to resolve it.

Problem 1: Not receiving any value upon typing the input.

Solution: I addressed this by implementing the “return” function.

Problem 2: Incorrect usage of “.lstrip()” and “.rstrip()”.

Solution: I resolved this by using these functions with “input()” within the “main()” function. While this approach worked, the code appeared somewhat untidy to me. Therefore, I opted to use them inside the “float()” function.

Conclusion

After completing problem set 0, I feel that the course not only aids in understanding concepts but also enhances my ability to think logically through problems, thereby developing the problem-solving skills essential for a developer. It also highlights the importance of clear syntax and proper indentation, ensuring the code is visually appealing and organized.

And finally, I'd like to encourage everyone not to give up, whether you're facing a big problem or a small one. Trust me, you'll get through it eventually!

0
Subscribe to my newsletter

Read articles from CircuitCoder directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

CircuitCoder
CircuitCoder