Results for “calculations”

Showing 11–20 of 21

  1. Article Python Fundamentals

    Variables and data types in Python

    When working with space-related calculations and data analysis, understanding Python's variables and data types is crucial. Whether you're calculating orbital velocities or processing telescope data…

  2. Article Python Fundamentals

    A Practical Guide to Getting Started with Programming

    …at math. Can I still program? Yes! While some space calculations use math, many programming tasks don't require advanced mathematics. Start with the basics, and learn more math only when you need it…

  3. Article Python Fundamentals

    Nested Loops in Python

    …through table results to locate incorrect financial calculations. Searching for rovers on Mars is more interesting :D import random # Generate positions of lost rovers in a 10x10 km sector lost_rovers…

  4. Article Python Fundamentals

    Python Functions for Beginners

    …The number on the scale does, and that's what we're calculating.) def weight_on_mars(earth_weight): print(earth_weight * 0.38) weight_on_mars(70) 26.6 Looks fine. Now try to use that number for…

  5. Challenge

    Duration formatter

    …way there is: seconds since launch. That's perfect for calculations and useless at a glance. Is 100000 seconds one day or three? Turn it into the clock the flight controllers read, one step at a time…

    Write the code Easy 3 stages floor division modulo // %
  6. Challenge

    Live T-minus

    …should count up: T+00:05:00 five minutes in. Move the calculation into countdown(launch, now) , which returns the text with T- before launch, and at launch itself, and T+ after it, then print…

    Write the code Medium 2 stages datetime datetime.now timezone countdown
  7. Challenge

    Clear error messages

    …can't be negative: {burn_s} s") inside an if , before the calculation. A burn of 0 seconds is allowed. Raise TypeError A burn length read from a file arrives as the text "40" , and the function stops…

    Write the code Medium 2 stages errors raise ValueError TypeError
  8. Challenge

    Wrong average

    …any line you added before you check. Modify. Fix the calculation so it averages all three readings: add them up first, then divide. It must print: Average hull temperature: 20.9 °C Make: Average speed…

    Fix the code Easy 3 stages order of operations brackets average debugging
  9. Challenge

    Float surprise

    …go into the tank. Adding them up 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…

    Write the code Easy 3 stages float floating point rounding formatting