Computers and Technology, 06.03.2020 16:39 amandafutch24
Write a function called name_facts that will take a firstname (string) as an input parameter, and print out various facts about the name, including:
1) its length,
2) whether it starts with the letter A, and
3) whether it contains a Z or X.
To gain full credit for this exercise, you must use string formatting to print out the result.
Hints:
You will probably want to convert the string to lowercase when checking conditions 2 and 3. You can get by without it, but you'll have to make sure you check both lower and uppercase versions of the letters
You will have to use the in operator for condition 3
You will also probably want to make a separate message for conditions 2 and 3 (depending on the answer) and use string formatting to join them into the final message
Example output:
Given "Allegra" as input: Your name is 7 letters long, does start with the letter A, and does not contain a Z or X
Given "Xander" as input: Your name is 6 letters long, does not start with the letter A, and does contain a Z or X
Answers: 3
Computers and Technology, 22.06.2019 13:00
Which option should u select to ignore all tracked changes in a document
Answers: 1
Computers and Technology, 23.06.2019 03:30
How can you repin an image on your pinterest pin board a. click on the "repin" button b. click on the "add pin" button c. click on the "upload a pin" button d. click on the "save pin" button.
Answers: 2
Computers and Technology, 24.06.2019 11:30
Why is body language an important factor in a business meeting
Answers: 1
Computers and Technology, 24.06.2019 17:30
Which computer network component connects two different networks together and allows them to communicate? a is a node (or a device) that connects two different networks together and allows them to communicate.
Answers: 2
Write a function called name_facts that will take a firstname (string) as an input parameter, and pr...
Mathematics, 11.07.2019 02:20
Mathematics, 11.07.2019 02:20