Example
Exponentiation and Roots
Operator ** for exponentiation and calculating roots in Python.
Showing 1–10 of 17
Example
Operator ** for exponentiation and calculating roots in Python.
Article Python Fundamentals
…most reliable tool. Python, with its intuitive syntax and powerful numerical capabilities, has become the preferred programming language for space agencies and astronomers worldwide. In this article…
Challenge
…they raised, numbered from 1: Warnings by subsystem: 1. POWER: 3 2. GNC: 2 3. COMMS: 1 enumerate(warnings.most_common(), start=1) gives the rank and each (subsystem, count) pair; unpack them as rank…
Challenge
…Alerts Uptime ------------------------------------------ POWER OK 3 99.80% GNC WARN 2 97.25% PROP OK 0 100.00% COMMS DEGRADED 2 94.60% THERM OK 0 99.95%…
Challenge
…EV-1003 Abort system armed EV-1004 Switched to internal power Duplicates dropped: 2 Keep the IDs you have already printed in a set: start with seen = set() , skip an event whose ID is in seen , and…
Challenge
…pressure 3. Arm the abort system 4. Switch to internal power 5. Get a go from Mission Control enumerate(checklist, start=1) gives pairs of a number and an item. Unpack them in the loop: for number…
Article Mini projects
…this speed for any celestial body using NumPy - Python's powerful library for scientific computing. Why NumPy Instead of Regular Python? While Python's built-in math functions work fine for simple…
Example
Parameters allow passing data to functions. Functions become more flexible.
Example
Addition, subtraction, multiplication and division in Python. Basic arithmetic operations.
Challenge
Write problems(item), which lists everything wrong with one cargo item: missing fields, a mass that isn't a number, is 0 or is over the limit. Print a pass or fail line per item, then catch duplicate…