Quizzes :)

This blogpost will be dedicated to explain the quizzes that we made during the first partial.

QUIZ #1

The first quiz had two exercises: To obtain the volume of a cylinder with the values that the user wanted and exactly the same exercise that we did in “Fun with numbers (WSQ03)”

The first code is:quiz1.png

It’s really easy. We just need to ask the user for the radius and the height. Remember that the formula to get the volume of a cylinder is πr^2h. We use the “float” type of number because we don’t know if the user will type an integer or a number with a decimal part.

At the end, the result is printed.

Let’s explain the second exercise.

It’s exactly the same exercise than “Fun with numbers (WSQ03)”. The only difference is that all the results are printed at the same time.

quiz13

Here are my codes: Cylinder SumOfNumbers

Quiz #2

 

CC BY-SA 4.0 Quizzes :) by paogarcia2401 is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.