Article Python Fundamentals
Python Functions for Beginners
…functions, from your first def to return values, default parameters and scope, with runnable examples, common mistakes and six practice projects.
6 results
Article Python Fundamentals
…functions, from your first def to return values, default parameters and scope, with runnable examples, common mistakes and six practice projects.
Article Mini projects
…""" Calculates escape velocity for any celestial body. Parameters: mass: mass in kilograms radius: radius in meters Returns: escape velocity in m/s """ G = np.float64(6.67430e-11) return np.sqrt(2 * G…
Article Python Fundamentals
…= "2025-07-20" crew_size = 4 is_active = True # Mission parameters orbital_parameters = { "altitude": 408.0, # km "inclination": 51.6, # degrees "period": 92.68, # minutes } # Crew roster crew_members…
Article Python Fundamentals
…items, Python normally puts a space between them. The sep parameter lets you change this separator to anything you want: # Space station readings temperature = 21 pressure = 101.3 oxygen = 98 #…
Article Python Fundamentals
…Each rover collected 5 soil samples. Each sample has 3 parameters: pH, humidity (%), iron content (%). Use three nested loops to: Go through all rovers For each rover, go through all samples For each…
Article Mini projects
…in space happened by chance! Understanding Our Mission Parameters Before we launch into the unknown, we need to understand two key components: The Python random module - our cosmic dice Our solar…