Challenge
Launch counter crash
…and a function that adds one to it. On launch day, the first launch stopped the program with an error nobody had seen before. Predict what happens, find out why, then fix it in a way that keeps the…
Showing 21–30 of 47
Challenge
…and a function that adds one to it. On launch day, the first launch stopped the program with an error nobody had seen before. Predict what happens, find out why, then fix it in a way that keeps the…
Challenge
…Look closely at the if line and at the line under it. This program never runs, and a program that doesn't run can't be checked. After you run it and read the error, put a # in front of each of the…
Challenge
…and fix it. Learn to debug Python syntax errors the way programmers do.
Challenge
…that a monitoring system reads character by character. A first Python challenge on exact output with print(), right in your browser.
Example
Docstrings describe what a function does. Good programming practice.
Challenge
…with the same line, over and over, until someone stops the program. Predict what it does, find out why it never ends, fix it, then write a wait that knows when to give up. Predict and run Don't run…
Challenge
…module and called the variables a , b , x2 and tmp . The program works, but nobody, including its author a month from now, can tell what it calculates without working through every line. Predict what…
Challenge
…it handle a pass with no data and round the mean, so any program can use the summary.
Challenge
…one. That was a shortcut. A real API sends text, and the first thing any program does with it is turn that text into data. Do that step yourself with the json module, then deal with a response that…
Challenge
…for mean(): an ordinary list and a list with one value first, then the edge cases, an empty list that should give None and lists with negative values, so broken copies of the function can't pass.