Beginner’s guide to Python functions: code example with def, parameters and return

Python Functions for Beginners

Learn to write your own Python functions, from your first def to return values, default parameters and scope, with runnable examples, common mistakes and six practice projects.

Converting decimal numbers to Rocky's base-6 Eridian number system in Python

Base 6 Number System in Python

In Project Hail Mary, the alien engineer Rocky counts in base 6 because he has two hands with three fingers each. In this article, you'll build Python programs that convert between decimal, base-6, and Eridian notation.

Python if, elif and else decisions explained with space mission examples

Python If/Else for Beginners

Learn Python if, elif, and else with clear, space-themed examples and hands-on exercises. Perfect for beginners who want to chart the control flow of their programs.

Nested loops in Python processing 2D grids, tables and images

Nested Loops in Python

Nested loops let you work with 2D data like grids, tables, and images. Learn how they work, avoid common pitfalls, and write cleaner Python code with real examples.

Spaceship medication dispenser in Python that should not trust the system clock

Medical dispenser - Don’t trust the user

Dr. Ryland Grace hacked his ship's medication system by changing the clock. We'll build three Python dispensers—from vulnerable to bulletproof—showing why trusting system time is dangerous.

Escape velocity calculator in Python with a database of planets

Calculating Escape Velocity in Python

Learn how to calculate the minimum speed needed to escape a planet's gravity using Python. We'll build a complete calculator that works for any celestial body, from simple formulas to an interactive program with a planet database.

Two Python books for beginners compared side by side

Python Books for Beginners

Starting your Python journey but overwhelmed by book choices? I've spent years teaching Python to space industry newcomers, and these two books consistently deliver results - though for very different reasons. Let's see which learning style matches yours.

Online Python editor running code in the browser, also on mobile

Online Python Editor

Run Python code on your phone with real pandas, matplotlib & Pillow support. Online editor with mobile-friendly interface, CLI arguments & terminal output. No sign-up required.

First steps in programming, from the first line of Python code to real projects

A Practical Guide to Getting Started with Programming

Want to start programming but feeling overwhelmed? This beginner-friendly guide breaks down everything you need to know about learning Python, from writing your first line of code to building real projects. No experience needed!

Python number types and math operators in space exploration calculations

Numbers and Basic Math Operations in Python

Discover Python's mathematical operations through space exploration examples. Learn about number types, operators, and practical applications that will help you start your programming journey in an engaging way.

Python variables and data types for numbers, text and data structures

Variables and data types in Python

Learn Python variables and data types - the building blocks of programming. Discover how to store numbers, text, and complex data structures effectively while following best practices for clean and maintainable code.

Python print() function displaying satellite data and mission logs

Python print() Function

Master Python's print() function in space programming! Learn to display satellite data, format cosmic measurements, and create mission logs with this essential programming tool.

Random planet picker for space missions built with Python's random module

Python Random Module

In this tutorial, we'll combine Python programming with space exploration to create a random planet selector. Using Python's random module, you'll learn how to generate exciting space missions while mastering fundamental programming concepts.

Cosmic Health Tracker, a Python app for managing astronaut medical data

Managing Astronaut Medical Data with Python

Embark on an interstellar coding mission to create a Cosmic Health Tracker using Python. This beginner-friendly guide will teach you how to manage astronaut medical data with a graphical interface, database operations, and error handling.

Installing Python, choosing an editor and writing a first program

How to Start Programming in Python Fast

Want to start programming in Python fast? This guide will show you how to install Python, pick a simple editor, and write your first code in just a few easy steps. Perfect for beginners!

Elliptical planetary orbits drawn with the Python Turtle library

Drawing Planetary Orbits in Python

Dive into the world of planetary orbits using Python's Turtle library. Discover how orbital eccentricity shapes cosmic paths, from Earth's near-circular orbit to a comet's elliptical journey. Code your own solar system simulation in this inter

Your weight on each planet of the Solar System calculated in Python

Calculate your weight on different planets in Python

Discover how to create a Python program that calculates your weight across the solar system. This beginner-friendly guide takes you through each step, from setting up planet data to user input and weight calculation. Ideal for future space cadets at Gdyni

Star temperatures converted between Kelvin, Celsius and Fahrenheit in Python

Converting Temperatures in Python

Discover how to convert star temperatures from Kelvin to Celsius or Fahrenheit using Python. Learn to use formulas and Python libraries for precise calculations.