Address Label
Python
20 pts
Address Label
Create a variable address that holds this text over three lines, using a triple-quoted string. Start the text directly after the opening """ so that there is no empty first line.
Selam Tesfay Harnet Avenue Asmara
Then create:
first_letter— the first character ofaddress(use index0)in_asmara—Trueif"Asmara"is inaddress
Print address, then first_letter, then in_asmara. Expected output:
Selam Tesfay Harnet Avenue Asmara S True
Checklist
- Create
addresswith a triple-quoted string that holds the three lines exactly, with no empty first line. - Create
first_letter, the first character ofaddress. - Create
in_asmara: whether"Asmara"is inaddress. - Print
address, thenfirst_letter, thenin_asmara.
🔑 Solution
If you view the solution before passing, you earn half points for this exercise. You still need to type it and press Check to finish.
How it works, step by step
Point at a step to highlight its lines. Type the solution yourself and press Check answer to finish.
