106k views
4 votes
7.5 code practice python average award money

User Boann
by
7.3k points

1 Answer

7 votes

Answer:

Here's an example code in Python that calculates the average award money:

```

# Define a list of award money amounts

award_money = [1000, 2000, 500, 4000, 300]

# Calculate the total award money

total = sum(award_money)

# Calculate the number of award money amounts

count = len(award_money)

# Calculate the average award money

average = total / count

# Print the average award money

print("The average award money is $", average)

```

In this code, we first define a list of award money amounts. We then use the `sum()` function to calculate the total award money and the `len()` function to calculate the number of award money amounts. Finally, we calculate the average by dividing the total by the count, and print the result using the `print()` function.

User Flauwekeul
by
8.5k points

No related questions found