It's day 02. And, I am moving ahead with more interesting concepts in programming. I have decided today I am going to cover the most so, I could get a grasp on all the concepts at the earliest.
Day 02:
Well, how I planned & finalized today's study. It didn't go that way. I went out to solve reeborg's maze challenge that covers all that we learned yesterday. Seems like I need to work more hard on my problem-solving skills.
In the maze challenge, reeborg comes at random positions. I am able to solve most of all parts in a maze. Only, locations near to the corner of the maze I am facing a problem. As of now leading to a never-ending loop.
One more thing, 1002 is pretty dangerous in this world! Yes, true if you see 1002 without having a second thought; just go back to code review.
In the attached screenshot you can see 1002 execution steps. Sadly, I am stuck at it and will be re-doing this challenge all over again.
-> 1002 indicates a never-ending loop.
You can check out this challenge right here.
After this, I had moved to recursion and I understood it very well. Yet again for the second time today!!! Reeborg's recursion challenge made me realize: Honey, you're a novice :'( You can't learn python just by cramming concepts. Do more practice! HELL LOT OF PRACTICE.
In short, if we call out the definition of recursion then, it is:
Function calls itself repeatedly. If we're familiar with loops we can learn them easily.
Syntax:
def go_home():
if not at_goal():
move()
go_home()
# now do it!
go_home()
You can try this code here under home1 challenge. I am on its counting on challenge. Have few doubts for them sent a mail to Andre Sir. Hopefully, I get a reply from him so, I can re-continue my python study.
For a brief introduction to recursion please go here.
Also, I am thinking to take an udemy course alongside. I am finding difficulty in tracking my progress since I am learning under no guidance. I will do my research for a good course in python and will share if I get myself enrolled in any.
In total, 3-4 hours went by just in these two tasks. However, I am happy I am being consistent on my journey.
Thank You.
No comments:
Post a Comment