subject

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

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 08:30
Linda subscribes to a cloud service. the service provider hosts the cloud infrastructure and delivers computing resources over the internet.what cloud model is linda using
Answers: 1
question
Computers and Technology, 22.06.2019 15:20
This os integrated the processing power of windows nt with the easy-to-use gui of windows 98. windows 2000 windows 3.11 windows for workgroups windowa millennium edition
Answers: 1
question
Computers and Technology, 23.06.2019 07:00
You need a quick answer from a coworker. the most effective way to reach your coworker is through a. cloud server b. instant message c. teleconference d. telepresence
Answers: 1
question
Computers and Technology, 23.06.2019 07:30
What key should you press and hold to select and open multiple files at one time? enter alt control esc
Answers: 1
You know the right answer?
Write a function called name_facts that will take a firstname (string) as an input parameter, and pr...
Questions
question
Mathematics, 04.02.2020 11:51
question
Biology, 04.02.2020 11:51