Results for “keys”

Showing 11–20 of 20

  1. Challenge

    Nested response

    …patch URL from a nested launch response by chaining keys and indexes, then add the operator and orbit and cope with a launch that has no patches yet.

    Write the code Easy 2 stages dictionaries nested data lists JSON
  2. Article Mini projects

    Python Random Module

    …a random planet destination = random.choice(list(planets.keys())) # Get planet details planet_info = planets[destination] return destination, planet_info # Let's try our space lottery! planet, details…

  3. Challenge

    Daily mission report

    …with csv.DictWriter : a header row with the four keys, then one row per subsystem. After the report, print an empty line, the saved line, and the file as it was written: Saved report.csv…

    Write the code Medium 2 stages project formatting f-strings alignment
  4. Challenge

    Summary function

    …Write summarise(readings) , which returns a dict with the keys count , min , max and mean . Then print(summarise(pass_1)) prints: {'count': 5, 'min': 398.0, 'max': 455.2, 'mean': 419.5} Build the dict…

    Write the code Medium 2 stages functions return dictionaries min
  5. Article Mini projects

    Calculating Escape Velocity in Python

    …WITH NUMPY") print("="*50) names = list(planets.keys()) masses = np.array([planets[p]["mass"] for p in names]) radii = np.array([planets[p]["radius"] for p in names]) # Calculate all escape velocities…

  6. Article Mini projects

    Calculate your weight on different planets in Python

    …In our program, we use a dictionary to store planets (keys) and their corresponding surface gravities (values). This allows us to quickly look up the gravity of any planet we've included. Dictionaries…