Results for “strings”

Showing 31–40 of 65

  1. Challenge

    Sensor ID parts

    Split a sensor ID like ENG-2 into its subsystem and its unit number as an int, work out the next ID, then handle subsystems with a dash in their name using rsplit().

    Write the code Medium 2 stages strings split rsplit int
  2. Challenge

    Mission Control online

    Print status lines that a monitoring system reads character by character. A first Python challenge on exact output with print(), right in your browser.

    Write the code Easy 2 stages print output strings beginner
  3. Article Mini projects

    Base 6 Number System in Python

    …numpy as np # numpy.base_repr(number, base) returns a string print(np.base_repr(12, 6)) # Output: 20 print(np.base_repr(36, 6)) # Output: 100 print(np.base_repr(101, 6)) # Output: 245…

  4. Article Mini projects

    Medical dispenser - Don’t trust the user

    …= event.copy() stored_hmac = event_copy.pop('hmac') event_string = json.dumps(event_copy, sort_keys=True) expected_hmac = self._compute_hmac(event_string) if expected_hmac != stored_hmac: raise…

  5. Article Python Fundamentals

    Variables and data types in Python

    …complex(100, 20) # Creating from real and imaginary parts Strings (str) Text data, useful for storing names and descriptions: mission_name = "Artemis" spacecraft_status = 'Ready for launch' Boolean…