Skill Tree Activated

The quest to become an indie game developer

C#CodingTraining

Codeasy.net C# Beginner – Passing Parameters to Functions

Day 49 #100DaysOfCode

This was a tough one!

The first iteration of this program only had me looking at a single string of input to determine how many zeroes were in it. I thought I was on the right track with my code but, in the end, I couldn’t get the methods to call/work properly and I was stumped to the point that I had to be given the answer.

No worries. Learning is learning. I analyzed the code, determined where I was going off the rails, and practiced re-writing my program so that not only would it work properly, but I also was able to wrap my head around how to call the method.

The next assignment for me was to write the same type of program, only this time the user would be inputting any number of separate strings and all the zeroes amongst all of them would have to be counted.

I was determined to get this one completely on my own set myself to the task using what I had learned from the previous exercise. Of course, the meat of the program would stay the same, so the trick was how to get it all to work within a wrapper of multiple inputs. Going slow, and careful (and checking my work every step of the way!), I chipped away at the problem making sure everything functioned properly as I went. It still ended up taking me two days to complete, but I did it! There was no peeking and all the code came straight from my brain. That felt good!

Leave a Reply

Your email address will not be published. Required fields are marked *