Challenge
Legacy script
…then add assert tests that would catch either function breaking.
Showing 11–20 of 33
Challenge
…then add assert tests that would catch either function breaking.
Article Python Fundamentals
…but feeling overwhelmed? This beginner-friendly guide breaks down everything you need to know about learning Python, from writing your first line of code to building real projects. No experience…
Challenge
…12.5 s Use while True: , with float(text) inside try , break when it works, and except ValueError: for the message. The check doesn't show the question itself, only what the program prints. Only…
Quiz
…Lists, tuples, dictionaries and sets Loops with range() , break and continue Functions: default values, keyword arguments, returning several values and variable scope How it works 20 questions: 15…
Challenge
…different ways, then add a new priority parameter without breaking any existing call.
Challenge
…script prints: Day 1 flight log 08:00 Crew wake-up 08:30 Breakfast and medical check 09:15 Navigation update received 10:00 Course correction burn: 12 s 10:20 Burn confirmed by ground control 11:00…
Example
Checking if a set is a subset or superset of another set.
Example
Operator // for floor division and % for remainder (modulo) in Python.
Example
Return can be used to exit function early when a condition is met.
Example
Searching, replacing and splitting text. Advanced string manipulation methods.