Quiz 7

This quiz was about making a function that receive two lists of numbers and returns the dot product of the two lists.

What does it means? For example if your input is: [1,2,3,4] and [5,6,7,8], the answer will be 70. Why? Because (1*5)+(2*6)+(3*7)+(4*8) = 70

It wasn´t necessary to add the Not-a-number value because since the begging it ask to the user how many numbers does he wants on his lists.

You can see the code here: Dot Product.

Also I attach some pictures of the program working.

quiz7aquiz7b

 

Quiz 2

This quiz was about functions, they were many possible answers but it was expected that we use a loop or a recursion: 

The first one was: Create a program with the following function. Write a function called superpower that has receives two parameters (ints) and returns an integer which is first parameter raised to the power of the second, which is to say it returns a b . 

The second one: Create a program with the following function. Write a function called stars that has one parameter of type integer and PRINTS that many stars on a single line, so if we call the function with stars(5), the function will print like this: *****

Well I had to confess that this was a quiz that we had weeks ago, but at that time I didn´t know how to do it cz I didn´t know how to make a function and was not really sure how to do a Do-While. 

855

This was totally me when I saw the quizz LOL. Got it from: http://www.replygif.net/855

Now after investigating for making my WSQ’s and learning about how to make functions and Do-While, I was ready for this.

For making the first one I decided to use a Do-While. The first number would be multipling by itself until the «contador» (who was adding one each time the program repeated) was  the same value than the second number, who was the «raised to the ___ «.

While doing this program the first time I run it I noticed that I didn’t ask the user for the two values … JA-JA. (Not funny at all … ), the second time I run it… it did not work cz it was printing again the first value… and the third one (yes…you know what they say about the third one 🙂 ) it finally worked 😀 I just had to change the condition on the «while».  

Here is a link so you can see my code: Quiz 2 Ex. 1

El pase de diapositivas requiere JavaScript.

The second exercise was also about using a loop, so I decided to use a Do-While again. I used a ‘contador’ so the program would print an * until it reach the number that the user gives to the program. At first I was printing also the number so I took out the » cout << » that I had before calling the function and it worked correctly. 🙂

You can see my program here: Printing ‘ * ‘

quiz2parte2

#AbolishGrading

All this thing about learning by myself and no-grading its actually new for me and for many of us. At first this could sound really difficult because it is something we are not used to, but when the time passes you get to notice all the things that u have learn and mostly by yourself or asking to your classmates.

This way of learning can teach you not only the topics you are suposed to learn, also it teach you to be responsible, organize and helps you to learn to ask, something which I considere really difficult.

Today I can say that abolish grading its weird, yes, but even it is, I like it necause I can see all those things I learn and Im proud of it.

Guess the number

This WSQ was about making a program that picks a random number between 1 and 100 and then give you clues for you to know if you are near of the random number or not. Also the user is able to know how many guesses did he had to make to get the correct answer.

Read More