Search the courses, subjects, tracks, games and features, or jump straight to a page.
2 cards from this section. Quick, good the night before a test.
What does the math library in Python help you to do?
Think of basic math operations.
Name one function from the random library.
Consider functions that deal with randomness.
What does the math library provide?
Think of the operations you can perform with numbers.
True or False: The random library can only generate random floating-point numbers.
Consider different types of randomness.
Using the math library, create a function that calculates and returns both the area and circumference of a circle given its radius.
Recall the formulas for area (πr²) and circumference (2πr).
Design a simple quiz application using the random library that selects a random question from a predefined list of questions.
Think about how to select and display one question at random.
5 more questions in this section. Enroll free to practise them all.
Enroll free