Complete the body of the format_name function. This function receives the first_name and last_name parameters and then returns a properly formatted string. Specifically: If both the last_name and the first_name parameters are supplied, the function should return like so:

Answers

Answer 1

Answer:

Here is the Python program:

def format_name(first_name, last_name):  #function definition of format_name that takes first_name and last_name as parameters

   if first_name != '' and last_name != '':  #checks if first_name and last_name both are not equal to " "

       return ("Name: " + last_name + ", " + first_name)  #returns first name and last_name in format: "Name: last_name, first_name"

   elif first_name != '' or last_name != '':  #checks if either of the first_name or last_name is not equal to " "

       return ("Name: " + last_name + first_name)  #returns first name and last_name in format: "Name: last_name" or "Name: first_name"

   else:  #if both names are blank

       return ''  #return ""

 

Explanation:

The working of the above function can be checked by using the following statements:

print(format_name("Ernest", "Hemingway"))  

print(format_name("Voltaire", ""))  

print(format_name("", "Madonna"))  

print(format_name("", ""))

The program has a function format_name which takes two strings i.e. the first_name and last_name as parameters and returns the formatted string.

The first if condition checks if both the first_name and last_name are blank. For example if first_name = "Ernest" and last_name= "Hemingway" this means both the first_name and last_name are not blank or empty. So If this condition evaluates to true then the following statement is returned:

return ("Name: " + last_name + ", " + first_name)

This returns the last_name string first followed by a comma in between and then first_name string in the last. For the above example the string is printed in the following format:

Name: Hemingway, Ernest    

The elif condition checks if either of the first_name or last_name is blank. For example if first_name = "Voltaire" and last_name= "" this means last_name is blank or empty. So if this condition evaluates to true then the following statement is returned:

return ("Name: " + last_name + first_name)  

This returns the last_name string. For the above example the string is printed in the following format:

Name: Voltaire          

IF none of the above condition is true and both the first_name and last_name are blank then the following statement is returned

return ''  

This will just print and blank space in output.

The program and its output is attached.            

Complete The Body Of The Format_name Function. This Function Receives The First_name And Last_name Parameters

Related Questions

Which is true of ASCII and Unicode?


Every character written in Unicode can be represented in ASCII.

Every character written in ASCII can be represented using Unicode.

ASCII requires more bytes than Unicode.

ASCII and Unicode both define accented characters.

Answers

Answer:

The correct options is;

Every character written in A S C I I can be represented using Unicode

Explanation:

All characters found in A S C I I can be found in Unicode such that A S C I I is a subset of Unicode whereby the meaning of the numbers from 0 to 127 are the same in both A S C I I and Unicode

The size of the A S C I I character in 8-bit A S C I I encoding is 8 bits while a Unicode U T F - 8 encoding has between 8 bits (1 byte) and 32 bits (4-bytes)

A S C I I assigns only 127 of the 255 possible numbers that can be stored in an 8-bits character, where the spare characters are then used by P C s for accented characters, therefore, it A S C I I does not define accented characters

Answer:

Every character written in ASCII can be represented using Unicode

Explanation:

how can i earn money?​

Answers

Answer:

You could get a job.

Explanation:

I know that it is sometimes impossible to get a job, because you are unable to get to anywhere, maybe because your family does not own a car, and it is too far to walk, so you could ask your neighbors if they need anything done, and they might pay you. If these don't work, then you could see if you could get a friend to drive you, and get a job, and see if they will be your taxi, but you pay them money for gas.

Hope that helps.

Answer:

maybe babysit

Explanation:

i earned a lot of money

&. Give three differences between a
web browser
and web page​

Answers

Answer:

The three differences between the Web page and Web browser are given below.

Explanation:

A web browser seems to be a search application that enables internet connectivity. A web-page seems to be a single document containing Website content.A web browser, including Google Chrome as well as Firefox, has become a program on oneself machine. A web page, like Google or Twitter, is what you will need the application to accessWeb browsers can view the contents of the site via the application. Webpage should be any web page and sometimes web destination. If something is opened on the internet, it's a website.

Question 1 : Mercury Technical Solutions has been using SSL in a business-to-business environment for a number of years. Despite the fact that there have been no compromises in security, the new IT manager wants to use stronger security than SSL can offer. Which of the following protocols is similar to SSL but offers the ability to use additional security protocols? This task contains the radio buttons and checkboxes for options. The shortcut keys to perform this task are A to H and alt+1 to alt+9.

Answers

Answer:

The answer is "TLS and the DBMS".

Explanation:

In given- question there are two questions were included, which can be defined as follows:

The term, Transportation Layer Security is used as "TLS", that is an SSL security protocol that allows other security procedures should be used. It is an upgraded version of SSL, that works in very much the same way of  SSL, and by encrypting information and data transfer.

The DBMS is used to store, access and handle data like layout or domain name and record and file structure of the database, it meets in the business requirements, consumers can create their respective databases including DBMS.

You want to complete conversion tracking setup on your business website with Google Ads. You've already implemented a global sitewide tag. Your next step is to create event tags, which must be placed in the correct section of your web pages to properly function. Where's the event tag implemented on a web page?

Answers

Answer:

The answer is "Between the website tags immediately after the global site tag".

Explanation:

The event tag is used to log clicks as well as perceptions for adverts, not creative things, or to define the inventive data, It may insert more parameters.  

These Tags are code binder clips, that are added to the site and then sent to respondents to obtain and send data. In this users could use tags to monitor scrolls, track suitable formulation, gather feedback, start generating heat maps, display advertising, to your website for all kinds of applications. The API also sends event details to Google Ads, show & Video 360, Campaign Manager, Search Anzeigen 360, and google docs that use the international site tag in the JS tag.

You are an IT technician for a small computer store. You are designing a new gaming PC for a customer. You need to ensure that it provides the capabilities that will be needed by this type of PC. Which of the following should be a concern?

a. motherboard
b. CPU
c. graphics card
d. sound card

Answers

Answer:

all options

a, b and c the most important

Explanation:

Question 19 :Rachel, a database administrator, has created a database for her website. It contains pictures of vacations that people have uploaded. In the database, pictures have associated information about who uploaded them and the date. What is this an example of?

Answers

Answer:

The correct answer will be "Semi-structured data".

Explanation:

Semi-structured data comprise evidence that just isn't data collected in some kind of a traditional database management system, but then neither is content typed. It's indeed descriptive information or structured data, but that's not organized into a theoretical design, like a chart or perhaps a graph centered through an entity.

So that the given scenario is the example of semi-structured data.

Which decimal value (base 10) is equal to the binary number 1012?

Answers

Answer:

The decimal value of 101₂² base 2 = 25 base 10

Explanation:

The number 101₂² in decimal value is found as follows;

101₂ × 101₂ = 101₂ + 0₂ + 10100₂

We note that in 101 + 10100 the resultant 2 in the hundred position will have to be converted to a zero while carrying over 1 to the thousand position to give;

101₂ + 0₂ + 10100₂ = 11001₂

Therefore;

101₂² =  11001₂

We now convert the result of the square of the base 2 number, 101², which is 11001₂ to base 10 as follows;

Therefore converting 11001₂ to base 10 gives;

11001₂= 1 × 2⁴ + 1 × 2³ + 0 × 2² + 0 × 2 ¹ + 1 × 2⁰

Which gives;

16 + 8 + 0 + 0 + 1 = 25₁₀.

The decimal value in base 10 that is equal to the binary number 101_2 is; 5

We want to convert 101_2 from binary to decimal.

To do this we will follow the procedure as follows;

(1 × 2²) + (0 × 2¹) + (1 × 2^(0))

>> (1 × 4) + (0 × 2) + (1 × 1)

>> 4 + 0 + 1

>> 5

In conclusion, the decimal value we got for the binary number 101_2 is 5

Read more about binary to decimal conversion at; https://brainly.com/question/17546250

are the network administrator for your company. You are installing a new printer in the network. When you check the print server properties, it displays the following error: Server properties cannot be viewed. The print spooler service is not running. What should you do to resolve the issue using the least administrative effort

Answers

Answer:

Will have to run the net start spooler command.

Explanation:

The printer spooler seems to be accountable for overseeing incoming faxes that have been in effect intended for handling by the printer. Whether this device stops operating, your printer won't publish documentation as well as the machine may not notice it either.To solve these problems, you'll need to run the net start spooler command using the least administrative effort.

What do you mean by Bandwidth? Pls give full explanation

Answers

Answer:

In computing, bandwidth is the maximum rate of data transfer across a given path. It can be characterized as network bandwidth, data bandwidth, or digital bandwidth.

Explanation:

what is network and also how many types of network are there as well

Answers

Answer:

Summary:

Type of computer networks can categorize according to their size as well as their purpose

PAN is a computer network which generally consists of a computer, mobile, or personal digital assistant

LAN ( local area network) is a group of computer and peripheral devices which are connected in a limited area

WAN (Wide Area Network) is another important computer network that which is spread across a large geographical area

A metropolitan area network or MAN is consisting of a computer network across an entire city, college campus, or a small region

WLAN is a wireless local area network that helps you to link single or multiple devices using. It uses wireless communication within a limited area like home, school, or office building.

SAN is a storage area network is a type of network which allows consolidated, block-level data storage

System area network offers high-speed connection in server-to-server applications, storage area networks, and processor-to-processor applications

POLAN is a networking technology which helps you to integrate into structured cabling

Home network (HAN) is a always built using two or more interconnected computers to form a local area network (LAN) within the home

Enterprise private network (EPN) networks are build and owned by businesses that want to securely connect various locations

Campus area network (CAN) is made up of an interconnection of LANs in a specific geographical area

A VPN is a private network which uses a public network to connect remote sites or users together

Explanation:

Answer: Network is what is making you ask these questions.

Explanation: There are many different types of networks, like wifi, something like Verizon or Sprint, stuff like that. There are so many types of networks

What concept or principle requires layered, complementary controls sufficient to detect and deter infiltration and exploitation of an organization, its information systems, and its facilities?

Answers

Answer:

security In-depth

Explanation:

The security in depth is a principle in which a sequence of safeguarding channels is used to secure the important data and information i.e valuation to the company. It also increased the security for a company as a whole

Therefore in the given situation, the  security In-depth required to layered the safeguarding channels to detect the infiltration

Hence, the  security In-depth is the correct answer

Create a letter of at least 250 words addressed to your newspaper editor that describes your storage options, and give at least three reasons why your option is the best choice.

Answers

Answer:

Following are the letter to this question:

Explanation:

Dear Raju:

For what journal is produced, I was composing to analyze the data collection possibilities. First of all, I should recognize how many documents you ’re expected to store: images, text files, news articles, and other records, even though going to weigh up the document is quite crucial to analyze that the best way to store this documents.  

For hardware depositors, people will save the documents through memory chips, because this is a network interface with a huge variety of subject areas. In this single and the small device are use the massive quantities of data, that can be protected and many memory locations can be published and authored at the very same procedure.

And if you'd like to view the files previous with releases, its cloud computing provides storage solutions that can be extended to the length for just a little money. But you'll have to keep in mind that even strong internet access is often required. Its information would also have to be stored digitally and managed to make readable by the computer. Its objective of all these alternatives would be to make life simple and efficient to store and manage information. its standard disc repayments involve memory space, remotes, disc cages, and authority. Users will save equipment and tech assistance expenses with this alternative and you will always maintain its content online even though it is big files. Even so, to preserve your content, it should make a regular backup.  

If you determine that option fits your needs, let me learn and I'll support you there.

Yours sincerely,

Dev

Chris needs to create a simple web page with HTML. Which tool will he use? HyperText Web browser Text editor Operating software WILL GIVE 100 AND BRAINLIEST!!!!!!!!!!!!!!!!!!!!!!!!1

Answers

Answer:

The answer is "Text editor".

Explanation:

It is a computer program, which is used to provide editing on the plain text, and for this editing, we use a text editor. This tool differs from word processors software because it doesn't add additional text editing metals. In this tool, we also write the HTML code, and the incorrect choice can be defined as follows:

HyperText is a wrong choice because in these two or more pages are linked and it is used to move from one page to another. The Web browser is also a wrong choice because it is used to display the design of the web page. Operating software is also a wrong choice because it system software in which all things are done.  

Answer:

text editor

Explanation:

Which of the following is considered information? a. A single keystroke b. All the characters on a keyboard c. An individual test score d. Average of a series of test scores

Answers

Answer:

The correct option is;

d. Average of a series of test scores

Explanation:

Information is defined as the knowledge or news which has been sent by one person and received by another such as the reply for a request for the current weather at a specific geographical location

Information is data that has been interpreted, processed, organised, put into a structured and presented within a given context that can be intelligible, meaningful and useful to people.

The game begins with the player having 20 POINTS

The player rolls 2 six sided dice and the sum of faces on the two dice are calculated. That’s called the players POINT.

If the POINT is a 7 or 11, the player wins his POINT

If the POINT is a 2, 3, or 12, the player loses his POINT

If the POINT is anything else, then the game continues by the player rolling the two dice again and again recording and checking the sum until

The player makes his point (The sum of his dice roll equals his POINT value) and then he wins his POINT

The player rolls a 7 and then he loses his POINT.

The player is considered a winner if he can acquire 60 POINTS and is considered a loser when he runs out POINTS

After the program has finished, display the total number of rolls of the dice that were made in the entire game.
In need for python file grade 11 work

Answers

Answer:

Following are the code to this question:

import random#import package for using random method  

def rolling_dice(): #defining method rolling_dice that uses a random number to calculate and add value in dice1 and dice2 variable

   dice1 = random.randint(1,6)

   dice2 = random.randint(1,6)

   return dice1 + dice2

def rolling(): # defining method rolling

   n_roll = 0  # defining num variable that initial value that is 0.

   p = 20 # defining variable p for looping, that points in between 1 and 59

   while p > 0 and p < 60: # defining loop that counts value dice value two times  

       d = rolling_dice()#defining d variable that hold method value

       n_roll+= 1 #defining n_roll that increment n_roll value by 1

       if d == 7 or d == 11:# defining if block that uses the d variable that checks either 7 or 11, player won d in p variable

           p+= d   # use p variable that adds d variable

       elif d == 2 or d == 3 or d == 12:#defining elif block to that checks d variable by using or operator  

           p-= d#defining d variable that decreases d variable variable

       else: # defining else block

           p1 = d # using p1 variable that store d value  

           while True:# defining loop that calculates values

               d = rolling_dice()#defining d variable that holds method values

               n_roll += 1 #increment the n_roll value by 1

               if d == 7:#defining if block that checks d value equal to 7

                   p -= p1#subtract the value of p1 in p variable  

                   break # exit loop

               elif d == p:#defining elif block to check d value is equal to p

                   p += p1#adds the value of p1 in p variable  

                   break#using break keyword

   if p<= 0:#defining if block that checks p-value is less then equal to 0  

       print('Player lost')#using print method

   elif p>= 60:#defining else block that checks p-value is greater than equal to 60

       print('Player won')#using print method to print the value

   print('number of dice rolls:', n_roll)#use print method to print n_rolls value

rolling()

Output:

Player lost

number of dice rolls: 38

Explanation:

In the above-given python code, a method "rolling_dice" is declared, inside the method two-variable "dice1 and dice2" is declared, that uses the random method to calculate the value in both variable and use the return keyword to add both values.

In the next step, another method the "rolling"  is declared, inside the method "n_roll and p" is declared that assigns the values and use the two while loop, inside the loop if block is defined that calculates the values. In the next step, a condition block is used that stores value in the p variable and use the print method to print the "n_roll" value.  

what are the disadvantageous of emails

Answers

Answer:

it could lead to overload of information.. wastage information.it can cause misunderstanding and disabilities between both person.

Need internet connection.without it can't use.

it can be hacked.and also lack the personal touch..

Answer:

they can cause misunderstandings and people read with diffrent

moods

Explanation:

A small group of travelers is meeting inside an ancient building, and the travelers need access to the Internet using their mobile devices. However, the group is in an area where Wi-Fi Internet is not available and cellular coverage is intermittent. One of the travelers has an unlimited cellular data plan and a strong consistent signal. Which of the following methods would most likely be implemented to provide Internet service to the group?a. Cell phone tetheringb. Satellite Internetc. Mobile hotspotd. Cell phone tethering

Answers

Answer:

c. Mobile hotspot

Explanation:

A mobile hotspot is a hotspot that is to be activated by turning on the WiFI hotspot. It is used to share the cellular data to the laptop, computer system and the mobile devices who do not have an internet connection

Since in the question, it is mentioned that the one traveler has an unlimited cellular data plan and a consistent strong signal

So the mobile hotspot should be used to provide internet service to the group.

An IT firm came across a startup company that offers a new system of computer storage. It is currently in the experimental phase. Which aspect of the technology will the firm consider before adopting it?
a
internal storage
b
graphics
c
physical features
d
commercial potential

Answers

Answer:

d . commercial potential

Explanation:

The commercial potential of the technology would be a very important detail to look at before purchasing the new system of computer storage from the startup company.

This is important because the IT firm would be eager to know how the market would accept the product when it is launched. If the public does not like the product, then the firm would suffer a loss, this is why it is paramount.

can anyone please help me with this

Answers

Answer:

This should do it. I assume the alignment of the numbers is not important?

<!DOCTYPE html>

<html>

<head>

<style>

table {

 border-collapse: collapse;

 font: 15px Verdana;

 font-weight: bold;

}

table, td {

 border: 1px solid black;

}

td {

 width: 80px;

 height: 80px;

 text-align: center;

}

</style>

</head>

<body>

<table>

 <tr>

   <td>1</td>

   <td>2</td>

   <td>3</td>

   <td>4</td>

 </tr>

 <tr>

   <td colspan="2">5</td>

   <td>6</td>

   <td rowspan="2">7</td>

 </tr>

 <tr>

   <td>8</td>

   <td>9</td>

   <td>10</td>

 </tr>

</table>

</body>

</html>

ou have spent the last two hours creating a report in a file and afterwards you use cat to create a new file. Unfortunately the new file name you used was the same as the name you used for the report, and now your report is gone. What should you do next time to prevent this from happening

Answers

Answer:

The answer is "Set -o noclobber command before starting."

Explanation:

Whenever this prevent is happening we set the -o noclobber command, this command( -o noclobber ) is used to prevents its > driver to overwrite system files.  Or whenever the user may want to violate their file in certain cases. For this case, users can use > instead of just turn  -o noclobber off! Push the formal file.

state the function of font group in the home tab​

Answers

Explanation:

This group provides access to all the Character Formatting commands.

Order the steps a user needs to follow to preview and then print a document

Answers

Answer:

Click file tab, click print tab, preview document, print document.

Answer:

Click file tab, click print tab, preview document, print document.

Explanation:

Click file tab, click print tab, preview document, print document.

Xavier wants to use a solver to find optimal solutions for a decision problem. What should he select as X in the series of clicks for this purpose: Data tab > X > Solver > Enter Solver parameters (read on) > Check "Make Unconstrained Variables Non-Negative" > Select "Simplex LP" > Solve?

Answers

Answer:

The answer is "Analyze"

Explanation:

The term Analyze is the use of a machine or critical thinking to enable more effective management by companies and their information systems, in which the Xavier wishes to use a method for solving to find ideal decision-making strategies. Its object of the series analyses X selects, that's why the "Analyze " is correct.

An application programming interface (API) is: Group of answer choices the code the application software needs in order to interact with the CPU the currently active part of an application all other answers are incorrect the code to interface between an application and a peripheral like a printer the code to interface between an application and RAM

Answers

Answer:

The code the application software needs in order to interact with the CPU

Explanation:

what are the uses of mobile phones?​

Answers

Answer:

We use mobile phones to:

1. communicate with our friends and family

2. looking for the information/news in the world

3. looking for the material for study

and many others

may it helps^_^

Answer:

Mobile phones are used for a variety of purposes, such as keeping in touch with family members, for conducting business, and in order to have access to a telephone in the event of an emergency. Some people carry more than one mobile phone for different purposes, such as for business and personal use.

Explanation:

Plz mark me as brainiest

How are procedural and object-oriented programming approaches similar?
A. Both approaches are used when writing programs.
B. Both approaches focus on functions, modules, and processes to write programs.
C. Both approaches focus on calling attributes and behaviors to write programs.
D. Both approaches require little planning in order to write completed programs.

Answers

Answer:

A. Both approaches are used when writing programs.

Explanation:

Procedural programming (PP), also known as inline programming takes a top-down approach. It is about writing a list of instructions to tell the computer what to do step by step. It relies on procedures or routines. Object-oriented programming (OOP) is about encapsulating data and behavior into objects.

Hope this helps....

Have a nice day!!!!

Answer:

A

Explanation:

Help me what is that my phone I will mark brainslist

Answers

Answer:

Following are the ways to resolve this error:

Explanation:

To solve this error there two methods, that is available, which can be defined as follows:

The First way by the turn off screen time:

To turn off screen time goto the setting app on your iPad, iPhone, or other devices.In this, there is a screen time option in which we click on turn off the screen time, and confirm it.After that, go to the apps store and download the app.

The Second way by the re-login on apple id:

To re-login on apple id first, we log out it and for logout go to setting inside this go to iTunes & app store.After open this option click apple id after the click, this click in the sign-out option after sign out re-login in by your id and password. To install the app first delete the app by a tap on the app this provides the option to delete the app, then go to the apps store. In this go to the purchase option then select the option that not in the device then download the file.

Which of the following is an accurate definition of a computer system? A computer system consists of the operating system that tells the computer how to execute commands. A computer system is a network that allows computers, tablets, smartphones, etc. to connect to the Internet. A computer system is a collection of hardware and software components that work together to meet the needs of the user. A computer system is a group of hardware devices that work together.

Answers

Answer:

I believe it's  A computer system consists of the operating system that tells the computer how to execute commands.

Explanation:

All of the following statements about MapReduce are true EXCEPT: MapReduce handles the complexities of network communication. MapReduce is a general-purpose execution engine. MapReduce handles parallel programming. MapReduce runs without fault tolerance.

Answers

Answer:

The correct option is;

MapReduce runs without fault tolerance

Explanation:

Map Reduce is a technique of processing or a framework of software, that is geared towards managing, sorting and handling large data by working in the Map and Reduce phases where the map function involves the dividing, filtering and sorting of the data and mapping of the split data while the reduce method involves the rearranging, summary activities having the data reduced.

Other Questions
Discuss Machiavelli's beliefs about the state. Organize these events of the French Revolution from first to last.1 Reign of Terror2 Napoleon's coup d'tat3 establishment of the Directory4 storming of the Bastille Translate the following into an algebraic expression: The number that is 40% more than five more than a number a. Find 0.01 more than 9.154 Joey went for 15 auditions. Out of those 15 auditions, he got called back for 30% of them. Approximately how many did he get called back for? which expression shows a way to find 28137 A box contains 30 widgets, 4 of which are defective. If 4 are sold at random, find the probability that (a) all are defective (b) none are defective. y elabora el siguiente cuadro como un ejercicio personal para identificar tus caractersticas, tus capacidades, tus valores, tus fortalezas y tus limitaciones. How the population environment and health are related with different aspects? Elaborate Please answer this correctly without making mistakes Which of the following statements would best characterize someone who is not culturally competent in working with others from different cultures?a. The person varies the rate of their speaking.b. The person uses facial expressions when communicating.c. The person pays attention to verbal and non-verbal behavior.d. The person fills "silence" during conversations. Donny has three times as many candy canes as Marc. Marc has thirty more candy canes than Bob. They have 500 candy canes altogether. How many candy canes does Donny have? solve for -5x-13(2+x)=5x-10 The rhinestones in costume jewelry are glass with index of refraction 1.50. To make them more reflective, they are often coated with a layer of silicon monoxide of index of refraction 2.00. What is the minimum coating thickness needed to ensure that light of wavelength 480 nm and of perpendicular incidence will be reflected from the two surfaces of the coating with fully constructive interference? 10 points to the person who answers this whole thing:) A student says that a coordinate grid under a dilation with the center at the origin and scale factor 2 does not change the grid. The image is still a coordinate grid. How do you respond? On November 1, Orpheum Company accepted a $10,900, 90-day, 12% note from a customer to settle an account. What entry should be made on the November 1 to record the note acceptance Please help me answer the question Choose the function whose graph is given by On November 1, Alan Company signed a 120-day, 10% note payable, with a face value of $11,700. What is the adjusting entry for the accrued interest at December 31 on the note