Answer:
earned = 0
total = 0
exercises = int(input("Enter the number of exercises: "))
for i in range(exercises):
score = int(input("Enter score" + str(i+1) + ": "))
total_score = int(input("Enter total score for exercise " + str(i+1) + ": "))
earned += score
total += total_score
print("The total is %" + str(earned/total * 100))
Explanation:
*The code is in Python.
Set the earned and total as 0
Ask the user to enter the number of exercises
Create a for loop that iterates number of exercises times. For each exercise;
Ask the user to enter the score earned and total score of that exercise
Add the score to the earned (cumulative sum)
Add the total_score to the total (cumulative sum)
When the loop is done, calculate the percentage, divide earned by the total and multiply the result by 100, and print it
A semi-circle is a half circle. Find the area of a semi-circle with a radius of 8.6 meters.
The area of the semi-circle is
Answer:
it could be your internet
Explanation:
mine used to do it to me because of internet and since everyone is one the internet because of the Coronavirus everyone is working online that could be the case
:)
Answer:
The <u>OR</u> logical operator works best when testing a number to determine if it is outside a range
Explanation:
The answer to this statement is:
The <u>OR</u> logical operator works best when testing a number to determine if it is outside a range
The concept of logical operators is simple. They allow a program to make a decision based on multiple conditions
The AND (&&) operator is used to determine whether both operands or conditions are true
The NOT (!) operator is used to convert true values to false and false values to true. In other words, it inverts a value
The OR ( || ) operator is used to determine whether either of the conditions is true. If the first operand of the || operator evaluates to true, the second operand will not be evaluated.