asked 115k views
5 votes
Create a program that will compute the following:Prelim grade

a. 100% of the given grade
b. 50% of the given grade
c. 30% of the given grade
d. 10% of the given grade

1 Answer

4 votes

Final answer:

To compute different percentages of a given grade, you can create a program that takes the grade as input and calculates the desired percentages. Use multiplication by the appropriate decimal value to calculate the percentages.

Step-by-step explanation:

To create a program that computes the given grades, you can use the following steps:

  1. Get the grade from the user.
  2. Calculate 100% of the given grade by multiplying it by 1.
  3. Calculate 50% of the given grade by multiplying it by 0.5.
  4. Calculate 30% of the given grade by multiplying it by 0.3.
  5. Calculate 10% of the given grade by multiplying it by 0.1.

Here is an example code snippet in Python:

grade = float(input('Enter the grade: '))

grade_100 = grade * 1
grade_50 = grade * 0.5
grade_30 = grade * 0.3
grade_10 = grade * 0.1

print('100% of the given grade:', grade_100)
print('50% of the given grade:', grade_50)
print('30% of the given grade:', grade_30)
print('10% of the given grade:', grade_10)
answered
User Izion
by
8.5k points