192k views
4 votes
Winifred likes to play video games during her free time. She is trying to accumulate enough points by playing the game in order to gain the supreme warrior status. Winnie has played the game for the past seven days of the week and would like to total her points to determine if she's earned the supreme warrior status. Create a program that will ask Winifred to enter the score for each day of the week. The program will accumulate the scores and determine(display) her earned status. The status are as follows based on points:

User Mina HE
by
7.6k points

2 Answers

4 votes

Answer:Coded down below

Step-by-step explanation:

Program:

# Initialize variables

total_score = 0

earned_status = ""

# Ask user for score for each day of the week

for day in ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"]:

score = int(input(f"Enter score for {day}: "))

total_score += score

# Determine earned status based on total score

if total_score >= 1000:

earned_status = "Supreme Warrior"

elif total_score >= 500:

earned_status = "Master Warrior"

elif total_score >= 100:

earned_status = "Novice Warrior"

else:

earned_status = "No status earned"

# Display earned status

print(f"Your total score is {total_score}. You have earned the status of {earned_status}.")

In this program, we first initialize two variables total_score and earned_status to keep track of the user's total score and earned status, respectively.

Next, we use a for loop to ask the user to enter their score for each day of the week. The loop iterates over a list of days and prompts the user to enter their score for each day. We convert the input to an integer using the int() function and add it to the total_score variable.

After the loop, we use a series of if statements to determine the earned status based on the total score. If the total score is greater than or equal to 1000, the user has earned the status of "Supreme Warrior". If the total score is between 500 and 999, the user has earned the status of "Master Warrior". If the total score is between 100 and 499, the user has earned the status of "Novice Warrior". Otherwise, if the total score is less than 100, the user has not earned any status.

Finally, we display the user's total score and earned status using the print() function.

User Mark Pearl
by
7.5k points
0 votes

Answer:3

Step-by-step explanation:

6+8=3

User Gluxon
by
7.2k points