Space Python Loading Python…

Basic Data Types

 
0:00 / 0:00

Challenge

Practise what this example shows with these challenges.

What arrived?

Write the codeEasy 3 stages

A sensor packet mixes text, numbers and text that only looks like numbers. Predict what type() shows, find the values that need converting, then convert a packet yourself.

Start the challenge

Float surprise

Write the codeEasy 3 stages

Predict 0.1 + 0.2, see the 0.30000000000000004 that every programmer meets once, then round it for display the way fuel gauges and dashboards do.

Start the challenge

Discussion

Stuck on this example or want to go further? Ask here, or see what others asked.

Log in to ask and reply.

script.py
PythonLn 1, Col 1Spaces: 4
Loading the Python environment…

Separate arguments with commas. They're passed on every Run as sys.argv[1:].