Python tasks
Every task in one place. Pick a mode, a topic or a concept to practise.
Exam-style tasks. Each shows the concepts it needs - review them first if you like.
14 tasks
- Write a programElementaryBMI calculatorGraduation exam preparation · StringsReading numbers from inputFormatting output: sep, end, f-stringsArithmetic operatorsSeveral branches: elif
- Write a programElementaryThe Fibonacci sequenceGraduation exam preparation · StringsVariables and assignmentReading numbers from inputfor loops and range()
- Write a programIntermediateMind readerGraduation exam preparation · StringsReading numbers from inputInteger division and remainder: // and %while loopsReturn values: returntry – except
- Write a programElementaryQuadratic equationGraduation exam preparation · StringsReading numbers from inputArithmetic operatorsSeveral branches: elifStandard modules: math, random
- Write a programBasicEntered values reversedGraduation exam preparation · ListsReading numbers from inputwhile loopsSlicingList methods: append, pop, remove, …
- Write a programElementaryTime in secondsGraduation exam preparation · The while loopReading numbers from inputFormatting output: sep, end, f-stringsInteger division and remainder: // and %while loops
- Write a programBasicNumbers without 3, 7 and 14Graduation exam preparation · The while loopReading numbers from inputLogical operators: and, or, notThe if statementwhile loops
- Write a programBasicEven numbers up to a limitGraduation exam preparation · The while loopReading numbers from inputwhile loops
- Write a programBasicCounting down to 5Graduation exam preparation · The while loopReading numbers from inputThe if statementwhile loops
- Algorithmic problemElementaryThe Collatz sequenceGraduation exam preparation · The while loopReading numbers from inputInteger division and remainder: // and %Two branches: if – elsewhile loops
- Algorithmic problemElementaryTo binaryGraduation exam preparation · The while loopText: the str typeReading numbers from inputInteger division and remainder: // and %while loops
- Write a programBasicTrain passengersGraduation exam preparation · Mixed tasksReading numbers from inputThe if statementwhile loopsCounting and summing in a loop
- Write a programBasicLeap yearGraduation exam preparation · Mixed tasksReading numbers from inputInteger division and remainder: // and %Logical operators: and, or, notTwo branches: if – else
- Write a programElementaryA bounded Fibonacci sequenceGraduation exam preparation · Exceptions (try – except)Reading numbers from inputwhile loopsList methods: append, pop, remove, …try – except