1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
finlep [7]
3 years ago
14

Write the function greeting that takes a string as input. That string will be formatted as Name Age Hobby, without any punctuati

on. greeting should split their response into list elements, then use index values to greet them by name and respond that you enjoy that hobby as well, with the format: ‘Hello, ! I also enjoy !' Make sure your output matches this format! For example, greeting('Jose 17 hockey') # => 'Hello, Jose! I also enjoy hockey!' greeting('Cindy 14 robotics') # => 'Hello, Cindy! I also enjoy robotics!'
Computers and Technology
1 answer:
Dmitriy789 [7]3 years ago
4 0

Answer:

The function in Python is as follows:

def greetings(details):

   details = details.split(' ')

   print('Hello, '+details[0]+'!, I also enjoy '+details[2])

Explanation:

This defines the function

def greetings(details):

This splits the input string by space

   details = details.split(' ')

This prints the required output

   print('Hello, '+details[0]+'!, I also enjoy '+details[2])

After splitting, the string at index 0 represents the name while the string at index 2 represents the hobby

You might be interested in
What are Manuscript signs​
mihalych1998 [28]

Answer: See explanation

Explanation:

Manuscript signs, refers to the marks or the symbols that are used within a manuscript in order to show the necessary corrections which should be made during the preparation of a document.

Manuscript formatting is vital as it makes the manuscript easier to assess. In a situation whereby manuscripts are poorly formatted, it can be turned down by agents and publishers.

5 0
3 years ago
Which of the following is an example of new and emerging classes of software?
Rama09 [41]
The answer is Smart technology :)
4 0
3 years ago
You friends parents are worried about going over their budget for the month. Which expense would you suggest is NOT a need?
Lapatulllka [165]

Answer:

Anything that doesn't have to do with food (including water), shelter, or clothing.

For Example: Going to the pool is not a need, going on vacation is not a need etc. etc.

Hope this helps

Explanation:

8 0
3 years ago
I'm surprised I haven't even got a single warning yet lol
dangina [55]

Answer:

Thats good

Explanation:

Thanks for the points~! ;)

7 0
2 years ago
Which loan type requires you to make loan payments while you’re attending school?
Levart [38]
<span>A:Unsubsidized federal loan</span>
7 0
4 years ago
Other questions:
  • A______ is a picture icon that is a direct link to a file or folder
    13·1 answer
  • Pascal's Triangle is a triangular array in which every number represents the
    15·1 answer
  • If a function needs to return more than one value, as a rule of good programming style, you should change it to a(n) ___________
    6·1 answer
  • ____ documents consist of the text to be displayed on a Web page, together with a number of special characters: tags that achiev
    14·1 answer
  • The most common types of effects include entrances and exits
    11·1 answer
  • What is the school wifi password trying to do my class work in school on different devices.
    9·1 answer
  • If a citation has a volume, title, and page numbers, it is a:
    9·2 answers
  • Use a while loop to output the even number from 100 to 147? This is python
    10·1 answer
  • Years ago when working a helpdesk, the most common question asked, almost daily, was about resetting passwords. What type of kno
    11·1 answer
  • Without using parentheses, enter a formula in cell F4 that
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!