Check the Message
Python
15 pts
Check the Message
The variable message is given. Create three variables:
length— the number of characters inmessage(uselen())has_port—Trueif the word"port"is inmessage(usein)no_keren—Trueif"Keren"is not inmessage(usenot in)
Then print them in that order. Expected output:
23 True True
Checklist
- Keep
messageunchanged and createlength, the number of characters in it. - Create
has_port: whether the word"port"is inmessage. - Create
no_keren: whether"Keren"is not inmessage. - Print
length,has_portandno_keren, one per line.
🔑 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.
