Results for “sum”

Showing 11–20 of 21

  1. Challenge

    input() returns text

    …+ "1" gives when you type 4, and store it as text in text_sum . Run print(crew + "1") to check, and remove that line before you check. Modify. Fix the program with int() , so that for 4 it prints…

    Fix the code Easy 3 stages input int TypeError type conversion
  2. Challenge

    Edge cases

    The summary on the engine dashboard uses a small mean() function. It works on the usual lists. Nobody has tried it on an empty pass, a pass with one reading, or the cryogenic sensors, whose readings…

    Write the code Medium 2 stages testing assert edge cases None
  3. Challenge

    Mission config

    …variable holding the text "Esrange" and put it into the summary, so the program prints: Perseid: crew 4, fuel 12.5 t, from Esrange, dry run True Make: Rover config Now write a config yourself. Store…

    Write the code Easy 3 stages variables data types int float
  4. Challenge

    Undo and history

    Extend the working cargo console: record every change to the hold in a history list and show it with a history command, then add undo, which takes the last change off the history and reverses it.

    Write the code Hard 2 stages project lists stack append
  5. Article Mini projects

    Base 6 Number System in Python

    …digit, with carrying. Remember - you carry when a column sum reaches 6 or more, not 10. This is how Rocky probably learned arithmetic in Eridian school. Good luck, cadets. And remember - if you ever…

  6. Article Python Fundamentals

    Python If/Else for Beginners

    …based on temperature ranges: < -100 , -100..50 , > 50 . Summary Conditional statements are how your programs make decisions. Start with simple if/else blocks, add elif when you need more branches, and…