Files
curriculum/1.solar-system/2.first-light/03.the-repl/index.md

846 B

type, title, xp, duration, difficulty
type title xp duration difficulty
challenge The REPL 25 25 1

The REPL

[INCOMING — Mission Control, Earth]

Cadet, the REPL — Read, Evaluate, Print, Loop — is Python's interactive shell. Open it on your machine with python3 and every line you type runs immediately:

>>> 5 + 7
12
>>> "Hello".upper()
'HELLO'

Use the REPL to figure out the answers. Then write them into a function compute that returns a tuple of all five, in order:

  1. 5 + 7
  2. 100 - 25
  3. 6 * 8
  4. "Hello" + " " + "World"
  5. 2 ** 10

[END TRANSMISSION]

Your Task

Open starter/starter.py. Replace pass with a return of a 5-element tuple containing the values above.

Objectives

  • compute() returns a 5-element tuple
  • Each element matches the corresponding expression