Results for “paths”

Showing 1–10 of 12

  1. Challenge

    Path in a config

    A Windows path prints wrong because \n and \t inside it turn into a new line and a tab. Fix it with a raw string, then handle a path that ends with a backslash.

    Fix the code Easy 2 stages raw strings escape sequences paths print
  2. Challenge

    Accept the right files

    Check whether a path starts with telemetry/ and ends with .csv using startswith() and endswith(), see why in isn't enough, then clean up paths with Windows backslashes, capitals and spaces first.

    Write the code Easy 2 stages strings startswith endswith paths
  3. Article Mini projects

    Drawing Planetary Orbits in Python

    …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

  4. Challenge

    File name from data

    …date. Build the file names from the data, then a folder path for each sensor. From an ID and a date Build the file name for this sensor's data: the ID in lower case, an underscore, the date and .csv…

    Write the code Easy 3 stages strings f-strings lower replace
  5. Challenge

    Silent branch

    …the last line, find which statuses give None, make every path return, then write a function where every path returns.

    Fix the code Easy 3 stages functions return None branches
  6. Article Mini projects

    Medical dispenser - Don’t trust the user

    …import os from datetime import datetime, timezone from pathlib import Path class SecureMedicationDispenser: """Uses cryptographic event chain with proper HMAC authentication This version: - Uses HMAC…

  7. Article Python Fundamentals

    Python print() Function

    …reading:\n20°C") # \n creates a new line print("Path to data: C:\\space\\temp") # \\ prints a single backslash print("Alert: \tLow fuel") # \t creates a tab space # Common special characters: # \n…

  8. Challenge

    Mission config

    …with the right type, then print them one per line: Rover: Pathfinder-2 Wheels: 6 Battery: 3.6 kWh Autonomous: False

    Write the code Easy 3 stages variables data types int float