Results for “sort”

Showing 21–27 of 27

  1. Challenge

    Seeded simulation

    …count the kinds in a dict called by_kind , and print them sorted after the total: Glitches in 100 readings: 5 DROPOUT: 3 SPIKE: 2 Call random.choice() only for glitches. Look at the total: it is no…

    Write the code Easy 2 stages random random.seed random.choice simulation
  2. Challenge

    Duplicate events

    …than once. Collect them in a second set and print them sorted, or none : EV-1001 Hatch closed EV-1002 Cabin pressure nominal EV-1003 Abort system armed EV-1004 Switched to internal power Duplicates…

    Write the code Medium 2 stages sets add in deduplication
  3. Challenge

    Upload router

    …that doesn't belong there at all. A router script sorts each file into its folder. Route files by their extension, then make the router cope with the names people and cameras actually produce. By…

    Write the code Easy 2 stages if elif else or
  4. Challenge

    Date and time from a timestamp

    …2026-03-14T09:30:05Z . Machines love it, because it sorts correctly as text, and people find it hard to read. Cut the date and the time of day out of it, then show them the way the ground team writes…

    Write the code Easy 2 stages strings slicing indexing timestamp
  5. Article Python Fundamentals

    Python Functions for Beginners

    …when you need a quick throwaway function, for example when sorting a list. Anything a lambda can do, a normal def can do too, and the def version is usually easier to read. Leave lambdas for later…