Results for “function”

Showing 71–80 of 86

  1. Article Mini projects

    Calculate your weight on different planets in Python

    …each pair are separated by a colon. Next, let's create a function to calculate weight: def calculate_weight(mass, gravity): return mass * gravity This function multiplies mass by gravity to get…

  2. Article Mini projects

    Drawing Planetary Orbits in Python

    …4. Creating Planets and Orbits Now, let's create a function to generate planets and another to calculate their orbital paths: def create_planet(color, size): planet = turtle.Turtle()…

  3. Challenge

    Launch schedule digest

    …(ISRO) 2026-11-20 18:45 UTC Polaris Cargo 4 (NASA) A small function such as window(launch) , returning the parsed datetime, works for the comparison and as the key for sorted() . strftime("%Y-%m-%d…

    Write the code Medium 3 stages project json datetime timedelta
  4. Article Python Fundamentals

    How to Start Programming in Python Fast

    …World!") This simple line introduces us to the print() function, a fundamental tool in Python for displaying output. 4. Running Your Python Code Once you've written your code, it's time to see it in…

  5. Article Python Fundamentals

    Python Books for Beginners

    …Python fundamentals (variables, lists, dictionaries, functions, classes), while the second half walks you through three complete projects - a Space Invaders-style game, data visualization, and a web…

  6. Challenge

    Statistics module

    …The check looks for the module and makes sure your own functions are gone. Spread, and too little data Now there are three passes. For each, print the mean, the median and the standard deviation…

    Fix the code Easy 2 stages statistics mean median stdev
  7. Challenge

    Readings summary

    …the summary. Summarise the readings with Python's built-in functions, then make sure the summary survives a pass with no readings at all. Min, max, mean Print the lowest and the highest reading, and…

    Write the code Easy 2 stages lists min max sum