Challenge
Alert banner
…an alert between two 30-character borders from a single f-string with \n, then add more lines and centre the title in the border.
Showing 11–20 of 72
Challenge
…an alert between two 30-character borders from a single f-string with \n, then add more lines and centre the title in the border.
Challenge
…unknown command: dance REJECTED "": empty command text.strip().lower().split() gives the words. Converting the length can raise its own ValueError : catch it and raise yours, with a clearer message…
Challenge
…START : Starting the sequence Normalise the answer with strip().lower() straight away, then compare it in an if / elif chain, with else at the end. Helpful errors Make the errors helpful. For an empty…
Example
Searching, replacing and splitting text. Advanced string manipulation methods.
Challenge
…quotes and an apostrophe exactly, then build it with an f-string that needs literal curly braces.
Challenge
…it turn into a new line and a tab. Fix it with a raw string, then handle a path that ends with a backslash.
Quiz
…on quotes, escape characters, sep, end, flush and f-string formatting, with instant answers.
Quiz
…for beginners: 20 multiple-choice questions on print(), strings, lists, dictionaries, loops and functions, with instant answers.
Challenge
Move the mission log's f-string into format_log(t, level, msg), a function that returns the line instead of printing it, then fix the alignment of every log line with one change inside the function.
Challenge
Scan a radar grid stored as a list of strings with a loop inside a loop, print the row and column of every # with enumerate(), then turn the loops around to find the columns that are clear all the way…