Results for “print”

Showing 71–80 of 237

  1. 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…

    Write the code Easy 3 stages float floating point rounding formatting
  2. Challenge

    Magic numbers

    …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…

    Fix the code Easy 3 stages constants refactoring variables clean code
  3. Challenge

    Readings that won't add

    …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…

    Fix the code Easy 3 stages type conversion int float str
  4. Challenge

    Status message crash

    …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…

    Fix the code Easy 3 stages TypeError str type conversion debugging
  5. Challenge

    What arrived?

    …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…

    Write the code Easy 3 stages type() data types type conversion sensor data
  6. Article Python Fundamentals

    Python Functions for Beginners

    …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…