Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Oppiskele Challenge | Introduction to Python 1/2
Introduction to Python for Data Analysis

book
Challenge

It is time for the first full-filled task! Follow the small instruction to cope with everything.

carousel-imgcarousel-imgcarousel-imgcarousel-imgcarousel-imgcarousel-img

Good luck!

Tehtävä

Swipe to start coding

The mean value of a set of numbers is equal to its sum divided by the amount. Here, you have rates of 3 apps that your company has created; calculate the mean rate of all apps. Follow the algorithm:

  1. Calculate the sum of rates of apps.
  2. Calculate the mean value of rates.

Ratkaisu

app1 = 4.9
app2 = 4.5
app3 = 5

# Calculate the sum of rates of apps
sum_rate = app1 + app2 + app3

amount = 3

# Calculate the mean value of rates
mean_value = sum_rate/amount

print("The sum of rates is:", sum_rate)
print("The mean value is", mean_value)

Oliko kaikki selvää?

Miten voimme parantaa sitä?

Kiitos palautteestasi!

Osio 1. Luku 4
app1 = 4.9
app2 = 4.5
app3 = 5

# Calculate the sum of rates of apps
sum_rate = ___

amount = 3

# Calculate the mean value of rates
mean_value = ___

print("The sum of rates is:", sum_rate)
print("The mean values is", mean_value)
toggle bottom row
some-alt