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]
2 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]2 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
Andrew’s Complete Cameras offers its customers an interactive website to help them choose the best camera for their lifestyle. B
anzhelika [568]

Answer:

The answer to the following question is Engage.

Explanation:

4e framework is the new framework for the marketing communications with the social media.

EXCITE the customers with the relevant offer.

EDUCATE the customers about the offerings.

Help the consumers EXPERIENCE for the product, indirectly or directly.

ENGAGE with them on the common platform.

7 0
3 years ago
Which option helps you choose the design of a slide in a presentation?
lozanna [386]
Hello! The slide transition helps with the transitions of slides and the animation helps out with the words appearing on the screen in a more creative way. Therefore, C and D are out. The slide layout is the part where if you click on it, slide designs are shown for you to choose from. The shapes can be used for design, but it doesn't help if you're looking for the design of a slide. The answer is A: slide layout.
5 0
3 years ago
What are some elements commonly included in forms in Word? Check all that apply.
MArishka [77]

Answer:

dates

text

drop-down lists

8 0
3 years ago
Which position most commonly runs routes in order to catch a pass?.
pochemuha
The position sis she commonly dish’s sayhabwueuc. sisjeuwbwbeudus
8 0
2 years ago
David needs to create a password. He uses "rtjjkliusfvwr." Which of the following best explains the weakness in his password?
Darina [25.2K]
I would say because it is hard to remember. Unless each one of those stands for a world, kind of like an acronym, then good luck remembering it!
3 0
2 years ago
Read 2 more answers
Other questions:
  • You want to deploy software using group policy. what is necessary before deciding to assign the software to your user accounts?
    11·1 answer
  • What character separates the file extension and the filename?
    13·2 answers
  • Know when the double, int, String, and char data types are best used. Example: I would store a social security number in a strin
    7·1 answer
  • Three of the most important jobs of security management are to ensure _____ are organized according to sensitivity, ensure that
    10·1 answer
  • If we are using an 4-character password that contains only lowercase English alphabetic characters (26 different characters), ho
    15·2 answers
  • Introduction to Identity and Fitting In
    7·1 answer
  • Why is distance learning better
    12·2 answers
  • This is your code.
    9·1 answer
  • Which of the following are pointers?
    9·1 answer
  • Why Use LinkedIn AI Automation Tools to Grow Your Sales Pipeline?
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!