Results for “float”

Showing 1–10 of 48

  1. Challenge

    Fuel for a burn

    …burn length with input(), turn it into a number with float() and work out the propellant it uses, then read the tank level too and show what the burn leaves.

    Write the code Easy 2 stages input float type conversion multiplication
  2. Challenge

    Decimal comma

    An operator types 42,5 and float() crashes with a ValueError. Predict it, find out why, accept both commas and dots with replace(), then read pressures written like 1 013,25.

    Fix the code Easy 3 stages strings replace float ValueError
  3. Challenge

    Mission config

    …Every value has a type: int for whole numbers, float for decimals, str for text and bool for True / False . Replace each ... with the type of that value, for example crew_type = int . You can check…

    Write the code Easy 3 stages variables data types int float
  4. Challenge

    Downlink time

    Read a file size in MB and a link speed in Mbit/s with input(), work out the transfer time without forgetting the 8 bits in a byte, show it in minutes and seconds, then count the ground station…

    Write the code Medium 3 stages input float bits and bytes round