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
Which of the following is the most appropriate wireless technology for real-time location of caregivers and mobile equipment in
Gekata [30.6K]
Wi-Fi is the anwser.Hope I helped.
7 0
2 years ago
Cybercrime has a serious economic impact on national and global economies that costs the _____ of its GDP every year.
maks197457 [2]

Answer:

World at least 1 percent

Explanation:

Cybercrime are crimes that focuses on networks of computers whereby a computer is used to commit the crime or a computer is the target of the crime, with the possible effect of a threat to the security and financial wellbeing of a person, an establishment or country

According to the report by Zhanna Malekos Smith and Eugenia Lostri, 'The Hidden Costs of Cybercrime' the monetary cost of cybercrime which is estimated at $945 billion is <u>a little above 1% of the World's GDP</u> which is around $87.55 trillion.

4 0
3 years ago
Write a program that asks for the number of calories and fat grams in a food. The program should display the percentage of calor
Zigmanuir [339]

Answer:

 The solution code is written in Python 3:

  1. calories = int(input("Enter number of calories: "))
  2. fats = int(input("Enter number of fat in grams: "))
  3. if(calories > 0 and fats > 0):
  4.    cf = fats * 9
  5.    if(cf < calories):
  6.        percent = cf / calories  
  7.        if(percent < 0.3):
  8.            print("Food is low in fat")
  9.    else:
  10.        print("Error input. Calories from fat cannot more than total calories")
  11. else:
  12.    print("Error input. Calories and fats must be more than 0")

Explanation:

Firstly, use input function to ask user to enter total number of calories and fat in grams (Line 1-2)

Next we do the first input validation to check if the calories and fats are more than 0 (Line 4). If so apply formula to calculate calories from fats. If not, print error input message (Line 5, 13)

Then we proceed to next input validation to check if calories from fact more than total calories. If so, proceed to calculate percentage of calories from fats and if it is lower than 30%, display the appropriate message (Line 6 - 9). If fail the second input validation, the program will display another error input message again (Line 11)

7 0
3 years ago
URGENT!! Ronald wants to search for an image of a sports car. Ronald doesn’t have to remember the specific name of the image to
vaieri [72.5K]

Answer:

Ronald will use a search engine

Explanation:

Ronald will use a search engine to find an image of a sports car, like he would do to search information to help him with his homeworks.

He could use keywords to identify some features he wants to see in the picture.  For example "red sports car" or "Ferrari sports car".  The results might come from a general Web spider fetch job or from specialized sites in terms of stock photos for example.

Then, Ronald will be able to see many images matching its request... and choose the one most appropriate for his needs.

5 0
3 years ago
Olivia works at a company that creates mobile phones. She wanted to estimate the mean amount of time their new phone's battery l
Kisachek [45]

An swer:  

                               

 E. xpl an ation:    

                               

3 0
3 years ago
Other questions:
  • The technology (software) that automatically downloads website information to your computer is called ________.'
    15·1 answer
  • Write a script that prints the multiples of 7 between 0 and 100. Print one multiple per line and avoid printing any numbers that
    14·1 answer
  • Assume the system with 256B memory and 64B cache and the block size of 16 bytes. I.e., there are 4 blocks in the cache. (a) For
    14·1 answer
  • If you've been a victim of identity theft, what should you do after contacting the company that reported the suspicious charge a
    9·1 answer
  • The feature that moves text from the right edge of a paragraph to the beginning of the next line as necessary to fit within the
    12·1 answer
  • Defensive programming is sometimes referred to as _________.
    5·1 answer
  • What sort of query is (strbucks]?
    14·1 answer
  • 2. Create 4 riddleson keywords which is related to fire wall.​
    12·1 answer
  • Identify the calculation performed by the following code.
    7·1 answer
  • eocs can be fixed locations, temporary facilities, or virtual structures with staff participating remotely.
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!