Challenge
Float surprise
…should be the easiest calculation on board, and yet Python prints something nobody expects. Predict it, look closely at what came out, then make the display show what a pilot needs to see. Predict and…
Showing 71–80 of 237
Challenge
…should be the easiest calculation on board, and yet Python prints something nobody expects. Predict it, look closely at what came out, then make the display show what a pilot needs to see. Predict and…
Challenge
…one means finding every copy. Predict what the report prints, find out where the magic numbers hide, then give them names. Refactoring means improving code without changing what it does, so the output…
Challenge
…The code that adds them up looks right, but the total it prints makes no sense. Predict what it prints, find out why, fix it, then handle readings with decimals yourself. Predict and run Don't run the…
Challenge
…Don't run the code yet. Read it and decide what it will print. Write your guess in prediction , at the top, between the quotes. Then run it and compare. Any guess passes this stage: the point is to…
Challenge
…Don't run the code yet. Read it and decide what it will print on its first line. Write your guess in prediction , at the top, between the quotes. Then run it and compare. Any guess passes this stage…
Article Python Fundamentals
…even a few lines of Python, you've already used functions. print() is one. So are len() , input() and int() . Somebody wrote them, gave each one a name, and now you can use them without ever looking…
Quiz
…Quiz or the Python While Loop Quiz . What does this code print? What does this code print? What does this code print? Given stops = ["Moon", "Mars"] , which lines change stops to ["Moon", "Mars"…
Quiz
…Loop Quiz or the Python If/Else Quiz . What does this code print? What does this code print? Which statements about this code are true? What does this code print? What happens when this code runs?…
Quiz
…you can predict how many times a loop runs and what it prints. What the quiz covers Looping over lists and strings range() with a start, a stop and a step, including countdowns Adding up and counting…
Quiz
…Quiz or the Python Strings Quiz . What does this code print? What does this code print? Given status = "ready" , which of these lines run without an error? What happens when this code runs? Given fuel…