Loading...

Integers Floats and Boolean


Analysis of a Fun Guessing Game: Accuracy and Percentage Calculations


Published on July 8, 2023 by Pradeepchandra Reddy S C

Tags: Python, Programming


SQL Introduction


Introduction:

In this article, we will explore the calculations and analysis of accuracy in the game, as well as the distribution of participant types. Throughout the process, I gained insights into fundamental concepts such as integers, floats, and booleans.


Problem 1: Calculating Points in a Cricket Tournament

In the first problem, we encountered a cricket tournament where teams earned points based on match outcomes. Team Aravali played 8 matches, winning 4, losing 3, and drawing 1. To determine their total points, we assigned 3 points for a win, 1 point for a draw, and 0 points for a loss. By multiplying the respective match outcomes with their assigned points, Team Aravali gained a total of 13 points.


Problem 2: Evaluating a Quadratic Function

The second problem involved a quadratic function, f(x), where we needed to evaluate its value at specific points. By substituting the given values of x into the function, we obtained the corresponding results. At x = 2, the function evaluated to 6, while at x = -1, it equaled -6. Lastly, at x = 1, the function resulted in 0. We also checked if each value was a root of the function by comparing it to zero.


Problem 3: Calculating Percentages of Food Items

Moving on to the third problem, we encountered a bag containing 45 apples, 65 oranges, and 30 bananas. To determine the percentage of each type of food item in the bag, we divided the quantity of each item by the total number of fruits (140) and multiplied the result by 100. As a result, we found that apples constituted approximately 32.14% of the bag, oranges accounted for 46.43%, and bananas made up around 21.43%.


Problem 4: Accuracy in a Guessing Game

In the final problem, we explored a guessing game involving three rounds and three different majors: Maths, Economics, and Physics. Out of a total of 100 participants, we correctly guessed 20 Maths majors, 30 Economics majors, and 20 Physics majors. To determine our accuracy in each round, we divided the number of correct guesses by the respective major's total count and multiplied the result by 100. Consequently, our accuracy for Maths and Economics majors stood at 66.67%, while for Physics majors, it was 80%. Finally, we calculated our overall accuracy by averaging the three individual accuracies, resulting in an overall accuracy of 71.11%.


Conclusion:

This article explored the calculations and analysis involved in a guessing game. We calculated the total points gained in a cricket tournament, evaluated a quadratic function at specific points, determined the percentage of different food items in a bag, and calculated our accuracy in each round of the game as well as the overall accuracy. These calculations showcase the importance of mathematical concepts in solving real-world problems and highlight the significance of accuracy and percentages in various scenarios.