#Quiz_Week_4

Hello, Young Padawans!

In this edition of my blog, I bring you the excersice for the quiz of this week, week number 4.

This has been the most difficult programm I’ve done until now, but not because of its complexity, but the functions. If you don´t understand what a function is, you may have to read chapter 3 again.

Then, let´s begin. First of all, Ken gave us some clues of how the two functions have to start, so I wrote them. after that I tried to start doing my main function, you know, the one that is the most important. After that I went back to my functions, instead of doing the two of them, I did first the “Minimum Number” first. So if that way, if I made a mistake, that would be in taht function. This one was kind of difficul because, instead of using conditionals, I used the “min” function, but the problem was that, in order for using this I had to add the “cmath” library, and the most difficult was that I didn´t realize this function is only for 2 variables. I tryed to do some internet research, but the thing that saved my ass was a code I got from the main Blog. It helped me to understad what I was doing wrong, it took me a while to figure out that, so I got stucked almost all day in that.

Doh.jpg

After that, the other function became very simple, so I just did it and that is it.

My code is something like this:

quiz4

I hope It can help you.

See ya, Padawans, and may the code be with you!

3 thoughts on “#Quiz_Week_4

Leave a comment