Author Archives: Salvador García
This conventions, they all come from a set of rules or guidelines called The Zen of Python, written by Tim Peters, these were originally made for Python, but since there are a lot of similarities in both languages, they can be used in C++ as well.
These rules mainly talk about order in your code, because somtimes if you are disorganized, it’s very hard to understand someone else’s code.
So that’s why it’s a very good idea to follow the guidelines, because it helps others, and it helps you.
I’m going to leave the link were I learned about these conventions.
So our final project is done, we had some trouble with it, as I explained on previous posts, the board printing was quite tricky, but with Ken’s help we were able to make it correctly.
After that, the checkQuadrant function was our next challenge we had to make a few changes on the code because it just wasn’t working, but after a few arrangements the function worked correctly.
Later we just put in some conditionals so that the user could only pick numbers in between the boardsize, that didn’t took us that much time
At the end everything worked as expected.
It was a good learning experience, to be honest, it was far much harder than I expected, without my teamate’s help, I wouldn’t have been able finish the job.
Here’s our code, have fun.
Hello here’s my video about Ken’s class, I hope you like it =)
I’m going to leave a video explaining briefly about the for loop, I hope you like it.
We are almost done with the final project, but we had a little set back with the board printing, so we talked to Ken today, so that we could get some questions answered on regards to our code. He will check out our code and tell us what we are missing so that we can get a good grade on this #PROJECT .
I’ll include our Github link so that you can check what Alan and I have been doing.
This switch thingy is a very useful tool, because instead of nesting many conditionals, you can be very specific, on the response of the program in which case.
As you can see you can add as many cases as you want, but you need to add “break” at the end, if not the default answer will also show up, that why when I typed in 3 goals, it shows the two answers.
If you get the hang of this tool, you will have many posible solutions for coding issues you may find.