Python modules exercises: random, math and datetime
Use random, math, datetime and the other modules schools teach, on problems checked by tests.
Beginner
- 515. Roll the DiceA handful of dice for a board game, rolled by the computer25 XP4 min
- 518. Shuffle a CopyMix up a list without spoiling the original25 XP4 min
- 545. Mean, Median and ModeThree ways to describe a typical mark in a class30 XP5 min
- 551. Square Tiles for a FloorCover a floor with the biggest square tiles that need no cutting30 XP4 min
- 575. When Is the Book Due?When must a library book come back, if the library shuts on Sundays?35 XP6 min
Intermediate
- 580. Best Sellers From the TillWhich items does the cafe sell the most of?60 XP10 min
- 582. Estimate Pi With Random DartsThrow thousands of random darts and find pi in where they land60 XP10 min
- 597. A Repeatable PasswordStrong random passwords that come out the same for the same seed70 XP12 min
- 606. Age and the Next BirthdayHow old is someone today, and how long until they are a year older?75 XP15 min
Advanced
Other topics
- Python Basics
- Strings
- Lists
- Dictionaries and sets
- Loops
- Functions
- Math
- Errors and exceptions
- File handling
- Sorting and searching
- Two pointers
- Sliding window
- Stacks and queues
- Recursion and backtracking
- Dynamic programming
- Greedy
- Graphs
- Trees
- Bit manipulation
- Classes
- Iterators and generators
- Parsing
- Simulation
- Python idioms
- Regular expressions
- Codes and ciphers
- Working with data
- Grids and matrices
- Geometry
- Games and puzzles
- Heaps
- Data structures
Or see every challenge, with study plans, today's challenge and duels.