Python Functions and List Operations
OfficialPythonBeginner
Overview
Practice basic function definitions and list comprehensions in Python.
Rules
Mode
All LinesNormalOff
Time Limit
No time limitMistake Limit
UnlimitedCode PreviewPython
def calculate_average(numbers: list[int]) -> float:
if not numbers:
return 0.0
return sum(numbers) / len(numbers)
data = [10, 20, 30, 40, 50]
result = calculate_average(data)
squared = [x ** 2 for x in data if x > 20]
print(f"Average: {result}, Squared: {squared}")Statistics
Mode
All LinesNormalOff
Time Limit
No time limitMistake Limit
UnlimitedCreated
January 20, 2026Challengers
3Total Attempts
6Completions
0Avg WPM
41.33Avg Accuracy
94.67%Ranking
| Rank | User | WPM | Accuracy |
|---|---|---|---|
| 43 | 96.0% | ||
| 41 | 94.0% |
Exercise Ranking
Top typers for this exercise
Total Participants
2
Period
All Time
Total Challenges (All Users)
3
Total Practice Time (All Users)
00:03:52
Total Keystrokes (All Users)
846
Period
Sort
| Rank | User | wpm | Accuracy | Started/Completed | Correct/Strokes | Total Time | Last Attempt |
|---|---|---|---|---|---|---|---|
| 43.00 | 96.00% | 2/2 | 534/562 | 00:02:34 | 1/27/2026, 07:26 AM | ||
| 41.00 | 94.00% | 1/1 | 267/284 | 00:01:18 | 1/25/2026, 01:42 PM |
Ranking of 2 users