Quiz
Python Tuples Quiz
…quiz on Python tuples: 15 questions on indexing, packing and unpacking, count(), index(), slicing and nested tuples. Instant answers.
Showing 151–160 of 233
Quiz
…quiz on Python tuples: 15 questions on indexing, packing and unpacking, count(), index(), slicing and nested tuples. Instant answers.
Challenge
…driver hands your alert check None instead of a number, and the check from "Alert level" stops with a TypeError in the middle of a pass. Extend your check so a missing reading is reported, not crashed…
Challenge
…as one row, then turn them into a report with a header and aligned columns.
Challenge
…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.
Challenge
…radio delay to a Mars orbiter, show it in whole minutes and seconds, then add the round trip without doubling a rounding error.
Challenge
Write a telemetry reading as a CSV row with print() and sep, add a header row, then switch to tabs for pasting into a spreadsheet. Real data formats from print().
Challenge
A Windows path prints wrong because \n and \t inside it turn into a new line and a tab. Fix it with a raw string, then handle a path that ends with a backslash.
Challenge
The flight computer won't boot: a quote and a bracket are missing. Read the SyntaxError, find the broken line and fix it. A beginner Python debugging challenge.
Challenge
A real check is commented out and a debug line is left on. Use # comments to put the pre-flight checklist script back in order. A beginner Python challenge on comments.
Article Python Fundamentals
…from your first def to return values, default parameters and scope, with runnable examples, common mistakes and six practice projects.