Python tasks
Every task in one place. Pick a mode, a topic or a concept to practise.
Programming tasks with tests, from easier to demanding.
13 tasks
- Write a programBasicMultiples of a numberLoops · Programming challengesFormatting output: sep, end, f-stringsfor loops and range()
- Write a programBasicAn upside-down pyramidLoops · Programming challengesfor loops and range()
- Write a programBasicHalf pyramidGraduation exam preparation · StringsInput with input()for loops and range()Slicing
- Write a programBasicFibonacci into a listGraduation exam preparation · Listsfor loops and range()Creating lists and indexingList methods: append, pop, remove, …
- Write a programBasicCoin tossGraduation exam preparation · Mixed tasksfor loops and range()Counting and summing in a loopReturn values: returnStandard modules: math, random
- Write a programElementaryA square made of rowsFunctions · Programming challengesfor loops and range()Defining and calling functionsParameters and arguments
- Write a programElementaryA list backwards without reverseLists · Programming challengesfor loops and range()Creating lists and indexingLooping over a list
- Write a programElementaryMissing numbersSets · Programming challengesfor loops and range()Sets and unique itemsUnion, intersection, difference
- Write a programElementaryThe Fibonacci sequenceGraduation exam preparation · StringsVariables and assignmentReading numbers from inputfor loops and range()
- Write a programElementaryPerfect numbersGraduation exam preparation · Mixed tasksInteger division and remainder: // and %for loops and range()Return values: returnDivisibility, primes, GCD
- Small projectElementaryA tuft of grassGraduation exam preparation · Graphics with tkinterfor loops and range()Standard modules: math, randomDrawing on a canvas (tkinter)Events: clicks and keys
- Write a programElementaryA text windmillGraduation exam preparation · Graphics with tkinterInput with input()for loops and range()Drawing on a canvas (tkinter)
- Small projectElementaryA row of squaresGraduation exam preparation · Graphics with tkinterfor loops and range()Drawing on a canvas (tkinter)Animation: after()