Python tasks
Every task in one place. Pick a mode, a topic or a concept to practise.
Every task of the course, from quick understanding checks to exam-style problems.
9 tasks
- Multiple choiceBasicWhich exception?Exceptions · Theory and practiceKinds of exceptions: ValueError, ZeroDivisionError, …
- Multiple choiceElementaryOutside the listExceptions · Theory and practiceCreating lists and indexingKinds of exceptions: ValueError, ZeroDivisionError, …
- Complete the codeElementaryA safe conversion to a numberExceptions · Theory and practicetry – exceptKinds of exceptions: ValueError, ZeroDivisionError, …Validating input
- Write a programBasicThe price of an itemExceptions · Programming challengesKeys and valuestry – exceptKinds of exceptions: ValueError, ZeroDivisionError, …
- Write a programElementaryA safe quotientExceptions · Programming challengestry – exceptKinds of exceptions: ValueError, ZeroDivisionError, …Validating input
- Write a programElementaryChecking the sides of a rectangleExceptions · Programming challengesReturn values: returnKinds of exceptions: ValueError, ZeroDivisionError, …Raising an exception: raise
- Write a programElementaryIs the number divisible?Graduation exam preparation · Exceptions (try – except)Integer division and remainder: // and %Splitting and joining: split() and join()try – exceptKinds of exceptions: ValueError, ZeroDivisionError, …
- Write a programElementaryA safe averageGraduation exam preparation · Exceptions (try – except)while loopslen, sum, min, max and sortedtry – exceptKinds of exceptions: ValueError, ZeroDivisionError, …
- Predict the outputIntermediatetry, except, else, finallyGraduation exam preparation · Exceptions (try – except)Return values: returntry – exceptKinds of exceptions: ValueError, ZeroDivisionError, …