Command Palette

Search for a command to run...

Hectal
Phase 3: Strings and Text in Depth
Python · Exercise 1 of 6Next
Beginner

Make initials from a name

The variable full_name holds "grace brewster hopper". Build a variable initials that holds the first letter of every word, in capitals, joined together: GBH.

Use split() to get the words, a for loop to visit them, and word[0] to take the first letter. Then print initials.

What Check tests

  1. initials is GBH
  2. The program prints GBH
  3. full_name is unchanged
  4. The initials are built from full_name, not typed in
  5. The program runs without an error

Stuck? One hint at a time

The solution unlocks after your first Check. Try first: that is where the learning happens.

main.py
Sign in to run your code.

Output

Press Run to see what your program prints.