Information about cookies on this page

Our website uses cookies to ensure the functionality of the website, to collect and analyze information about the performance and usage of the website. Privacy Policy

  • Courses
    • Discord
    • Twitter
    • Linkedin
    • Facebook
    • Instagram
  • Pricing
  • English
  • Čeština
  • Deutsch
  • Русский
Sign inStart free
  • Courses
  • Pricing

Community

Sign in
  
  • Courses
    • Discord
    • Twitter
    • Linkedin
    • Facebook
    • Instagram
  • Pricing
  • English
  • Čeština
  • Deutsch
  • Русский
Sign inStart free
  • Courses
  • Pricing

Community

Sign in

Quiz: Imports

A round pond has an area of 50 square meters. This program should print its radius and the length of its edge, but it ends with an error. Click the line with the mistake.

1from math import sqrt, pi
2
3area = 50
4radius = sqrt(area / pi)
5print("Radius:", round(radius, 2))
6print("Circumference:", round(2 * math.pi * radius, 2))
Back

5/8

  1. 1. Importing a Module
  2. 2. Rounding
  3. 3. Quiz: Rounding
  4. 4. Importing with from
  5. 5. Quiz: Imports
  6. 6. Random Numbers
  7. 7. Average and Median
  8. 8. Summary
Next

Try it yourself

Do this exercise right here in your browser. No account needed.