Results for “strings”

Showing 41–50 of 65

  1. Challenge

    Real JSON

    …is text, and the program stops with TypeError: string indices must be integers . Turn the text into a dict with json.loads() , then add a line for crewed : Launch: Lumen-3 Provider: JAXA Status: Go…

    Write the code Easy 2 stages json json.loads modules import
  2. Article Mini projects

    Managing Astronaut Medical Data with Python

    …column=0, padx=5, pady=5) self.astronaut_var = tk.StringVar() self.astronaut_dropdown = ttk.Combobox(self.medical_frame, textvariable=self.astronaut_var) self.astronaut_dropdown.grid(row=0, column=1…

  3. Challenge

    Telemetry from CSV

    …csv.DictReader Replace the old parser and its feed string: open telemetry.csv with newline="" , loop over csv.DictReader(csv_file) , and print each row in the same format as before: 09:30:05 ENG-2…

    Write the code Medium 2 stages csv csv.DictReader files open
  4. Challenge

    Crew roster

    …member: Kowalska Crew size: 4 Indexes start at 0, as in strings. crew[-1] is the last item whatever the list's length, and len(crew) counts the items. The whole roster Add the second in command, who…

    Write the code Easy 2 stages lists indexing negative index len
  5. Challenge

    Last five readings

    …at the end. A negative start counts from the end, as with strings. The window moves A new reading has arrived. Add new_reading = 772 under the list, append it to the readings, then show the new window…

    Write the code Easy 2 stages lists slicing negative slice append
  6. Article Python Fundamentals

    Python If/Else for Beginners

    …print("No payloads — skip deployment.") Empty lists, empty strings, zero, and None all evaluate to False . Pretty much everything else is True . Nesting: decisions within decisions You can nest if…