Challenge
Settings with defaults
…the defaults and laying their own values on top with update(), so any setting they haven't changed falls back, then warn about unknown keys instead of saving them.
Showing 1–10 of 13
Challenge
…the defaults and laying their own values on top with update(), so any setting they haven't changed falls back, then warn about unknown keys instead of saving them.
Example
Adding, changing and removing dictionary elements in Python.
Quiz
…quiz on Python sets: 15 questions on creating sets, add(), update(), remove(), union, intersection, difference and subsets. Instant answers.
Quiz
…15 questions on keys and values, get(), in, pop(), update(), loops and nested dictionaries. Instant answers.
Challenge
…follow a battery through one orbit. A PRIMM challenge on updating variables.
Challenge
…= "yes" timeout_s = 2.5 dict(DEFAULTS) makes the copy and update() fills it in. json.dumps(value) shows the difference between "256" and 256 . Every problem at once Check every saved setting, in the…
Challenge
…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 Science block begins End of log Pasted from a…
Challenge
A while loop waits for the antenna signal but never moves on to the next reading, so it never ends. Predict it, find the stuck counter, fix it, then write a wait that gives up when the readings run…
Quiz
Free Python quiz for beginners: 20 multiple-choice questions on print(), strings, lists, dictionaries, loops and functions, with instant answers.
Example
Adding and removing elements from a set. Basic set operations.