Write a program that asks the user how many names they have. (If they have a first name, two middle names, and a last name, for example, they would type 4.) Then, using a for loop, ask the user for each of their names. Finally, print their full name.

Answers

Answer 1

Answer:

The solution is implemented in python:

numnames = int(input("Number of Names: "))

nametitle = ["Surname: ","Firstname: ","Middlename: ","Middlename 2: "]

names = []

for i in range(numnames):

   name = input(nametitle[i])

   names.append(name)

   

print("Your fullname is: ",end=" ")

for i in names:

   print(i,end=" ")

Explanation:

This prompts user for number of names

numnames = int(input("Number of Names: "))

This lists the name titles in a list

nametitle = ["Surname: ","Firstname: ","Middlename: ","Middlename 2: "]

This initializes an empty list

names = []

The following for loop get names from the user

for i in range(numnames):

   name = input(nametitle[i])

   names.append(name)

   

The following instructions print the user fullnames

print("Your fullname is: ",end=" ")

for i in names:

   print(i,end=" ")

Answer 2

An example program in Python that asks the user for the number of names they have and then prompts them to enter each name.

It will then print their full name based on the names provided:

python

Copy code

num_names = int(input("How many names do you have? "))

names = []

for i in range(num_names):

   name = input("Enter name {}: ".format(i + 1))

   names.append(name)

full_name = " ".join(names)

print("Your full name is:", full_name)

In this program, we first ask the user to enter the number of names they have. The input is converted to an integer using int() since input() returns a string.

Then, we initialize an empty list names to store the names provided by the user.

Next, we use a for loop that iterates num_names times to ask the user for each name. The loop variable i starts from 0, so we add 1 to it when displaying the prompt using i + 1.

Inside the loop, we prompt the user to enter the name and append it to the names list. After the loop completes, we join all the names in the names list using the join() method with a space as the separator. This creates a single string representing the full name.

Learn more about python on:

https://brainly.com/question/30391554

#SPJ6


Related Questions

Modify your program from Learning Journal Unit 7 to read dictionary items from a file and write the inverted dictionary to a file. You will need to decide on the following: How to format each dictionary item as a text string in the input file. How to covert each input string into a dictionary item. How to format each item of your inverted dictionary as a text string in the output file. Create an input file with your original three-or-more items and add at least three new items, for a total of at least six items.

Answers

Answer:

Following are the code to this question:

import ast as a #import package ast

d1= {}#defining an empty dictionary  

def invert_dictionary(d1):#defining a method invert_dictionary

   i = dict()#defining variable i that hold dict method  

   for k in d1:#defining for loo to check dictionary value

       val = d1[k]#defining val variable to holds dictionary key values

       for val1 in val:#defining another for loop to hold value of dictionary and inverse it

           if val1 not in i:#defining if block to check value

               i[val1] = [k]#hold key value

           else:#defining else block

               i[val1].append(k)#add value in dictionary

   return i#return inverse value

with open("dict_items.txt", "r") as data:#use open method to add a list as a file

   dict_item = a.literal_eval(data.read())#defining a variable that covert item as a text string in the input file  

   '''covert input string into dictionary item'''

   e_val = input("Please enter a value")#defining variable e_val to input value

   dict_item['4']=str(e_val)#holding value in dictionary

   dict_item['5']='e'#holding value in dictionary

   dict_item['6']='f'#holding value in dictionary

   '''Invert the dictionary value '''

   invert_data =invert_dictionary(dict_item)#defining variable to holding method value

'''calculating the format of each item of inverted dictionary as a text string output file.'''

f_data = {i:str(j[0]) for i,j in inverted_data.items() }#defining f_data to hold coverted value

import json as j#import package

with open('out_put.txt', 'w') as file:#use open method to open file

   file.write(j.dumps(f_data))#add value

Explanation:

In the above-given code has four parts which can be defined as follows:

In the first part, a method invert_dictionary is defined that accepts a dictionary, and defines two for loops in which the second loop uses a conditional statement to convert the inverse form and return its value, and after inverse it use the open method to add a list as a file, and defining a variable that covert item as a text string in the input file.

In the second step, a variable e_val is declared for input value , and use the dict_item variable to holding dictionary  value, and call the method and hold its value.

In the third and fourth step it calculating the format of each item of inverted dictionary as a text string output file.

list the difference between sdram and dram​

Answers

Answer:

i need this for a challenge

Explanation:

According to the video, what are some concerns of Webmasters? Check all that apply.
how fast the website can be accessed
how many writers provide content for a website
how to create images for a website
the number of similar websites that exist
the time it takes for elements on a website to download
website security and privacy

Answers

Answer:

A.how fast the website can be accessed

E.the time it takes for elements on a website to download

F.website security and privacy

Explanation:

Answer:

1,5,6

Explanation:

hope this helps gg

how do u mark brainlyest on the computer

Answers

Answer:

Explanation:

An answer on Brainly can only be marked as Brainliest if the individual who answered the question is not yourself, and if one week has passed since the answer was posted. Once the week has passed and the answer is still there (has not been removed) then a Brainliest button should appear that will allow you to mark the answer as Brainliest. Simply click the button and the answer will be marked as Brainliest.

Brian has created the following selection sort class in Java. In which line is the index of the smallest value returned? In which line is the input array given as an argument?

public class SelectionSort{
private static int positionMin (int] vals, int startPosition) {
int minPosition startPosition;
for (int i startPosition; i
if (vals[i] vals[min Position]) {

minPosition = i;
return min

Position; private static void swap(int] vals, int firstPosition, int secondPosition) {

int temp; temp vals[firstPosition];
vals[firstPosition] vals[second Position];
vals[secondPosition] temp return public static void selSort(int| vals) {
int minPos for (int startPos 0; startPos< vals.length; startPos++){

minPos positionMin(vals,startPos); swap(vals,startPos, min Pos) ;

for (int i 0; i< vals.length; i++) { if(i
}else Jelse { System.out.println(vals[i]); } }; }

return; } }

Answers

Answer:

Explanation:

Since there are no line numbers in this question I will start counting from public class SelectionSort{ as line 1 and so on, as well as provide the code on that line.

The index of the smallest value is returned on line 8 where it says return min which shouldn't have any spaces and should be return minPosition;

The input array is given as an argument at the beginning of the function on line 2 where it says private static int positionMin (int] vals, int startPosition) {, as the variable vals.

This input array is also used as an argument on line 10 where it says Position; private static void swap(int] vals, int firstPosition, int secondPosition) and line 15 where it says vals[secondPosition] temp return public static void selSort(int| vals) {

please help me please help me.​

Answers

Answer:

dont know man thanks for points tho

but it is 209

Explanation:

I WILL MARK YOU BRAINLIEST NEED HELP ASAP....Name at least three actions you can perform on a inserted image

Answers

Answer:

you can move it you can shrink it and you can put a text box on it

If an insurance policy covers individual losses up to $10,000 and has a deductible of
$500, the insured will be paid how much in the event of a covered loss of $5,000?

Answers

Answer: $4500

Explanation:

The deductible is the amount that the insured that is, the policy holder will have to pay. In this case, there is a covered loss of $5000 and the insured has a deductible of $500.

Therefore, the amount that the insured will be paid will be the difference between $5000 and the deductible of $500. This will be:

= $5000 - $500

= $4500

What is a variable?

A.a box (memory location) where you store values

B. a type of memory

C. a value that remains the same throughout a program

D. a value that loads when the program runs

Answers

Answer. D: a value that looks loads when the program runs.


Explanation:

In programming, a variable is a value that can change, depending on conditions or on information passed to the program. Typically, a program consists of instruction s that tell the computer what to do and data that the program uses when it is running.

A single inheritance model means: * A) A class can only have one parent class (superclass) B) A class can only have one child class (subclass) C) A class cannot have a parent class (superclass) D) A class cannot have a child class (subclass) E) A class can have multiple parent classes (superclasses)

Answers

Answer:

The answer is A)

Explanation:

In programming languages like java you can only use single inhertance meaning a class can only inherit attributes from one class. But in other languanges like C you can have multiple inhertance

What is the volume of a rectangular prism with a length of 812 centimeters, width of 913 centimeters, and a height of 1225 centimeters?

Answers

Answer:

guys all you have to do is divide and multiply 812x913=741356

and this answer they give you going divide 741356. 1225

so easy guys let me in the comment

Explanation:

what security issues could result if a computer virus or malware modifies your host file in order to map a hostname to another IP address

Answers

Answer:

Man-in-the-middle attack

Explanation:

In this type of attack, the hacker uses the virus or malware to get and change his IP address and hostname to match the address and hostname of the target host computer. The allows the hacker to gain access to information sent to the target IP address first.

When we add suffix L to a integer it is called as __________​

Answers

Answer:

Long integer literal.

Explanation:

Integer literal can be defined as numbers that do not contain any decimal point or augmented part. An integer literals can be characterized as decimal, octal, or hexadecimal constant. When an integer liteal is added with prefix it tends to define its base, whereas suffix define its type.

The suffix L to an integer literal means long integer literal. The suffix can be written in any form, either upper case (L) or lower case (l).

Therefore, the correct answer is long integer literal.

During the reconnaissance step of the attack, what open ports were discovered by Zenmap? What services were running on those ports?

Answers

Answer:

Following are the solution to the given question:

Explanation:

It sends commands to its Nmap executable platForm, which is used to specified and retrieves the production. The  ZenMap utilizes templates, which are primarily Nmap.

The parameter templates to decide how scans become formed Several ports, like ports, are available: 11, 21, 22, 25, 53, 445, and 3306, all of which run TCP: Linux services, SMTP Postfix, Apache Tomcat/Coyote JSP.

A counter is ?

A. used only outside of the loop

B. none of the above

C. a variable used in a loop to count the number of times an action is performed

D. A person with a pen and paper

Answers

Answer: In digital logic and computing, a counter is a device which stores (and sometimes displays) the number of times a particular event or process has occurred, often in relationship to a clock. The most common type is a sequential digital logic circuit with an input line called the clock and multiple output lines.

NEED HELP WILL MARK BRAINLIEST 25 POINTS FOR ANSWER
Which option is typically only used when utilizing self joins?

display name

alias

relationship

primary key

Answers

Answer:

relationship

Explanation:

Answer:

I agree the should be C)relationship

Explanation:

edg 2021

According to shared security model, which two are a customer's responsibilities in Oracle Cloud Infrastructure (OCI)?

Answers

Answer:

According to shared security model, a customer's responsibilities in Oracle Cloud Infrastructure (OCI) are:

1. Workloads security: The customer is responsible for protecting the work function or a distinct capacity, like a Hadoop node, a Web server, a database, or a container, that it puts on the cloud.

2. Services configuration:  The customer is also responsible for securing the specifications that describe the different aspects of its managed service.

Explanation:

Responsibilities are shared between Oracle and the customers using the Oracle Cloud Infrastructure (OCI).  Oracle is solely responsible for the security of the underlying cloud infrastructure (such as data-center facilities, hardware, and software systems), while the customer is responsible for securing the workloads and configuring their services to suit their individual needs.

The distance a vehicle travels can be calculated as follows: distance = speed * time For example: If a train travels 40 miles per hour for 3 hours, the distance traveled is 120 miles.Write a program that asks the user for the speed of a vehicle (in miles per hour) and how many hours it has traveled. The program should use a loop to display the distance the vehicle has traveled for each hour of the time period.

Answers

Answer:

In Python:

speed = float(input("Speed: (mile/hr): "))

time = int(input("Time: (hr): "))

for hour in range(1,time+1):

    distance = speed * hour

    print("Distance: "+str(speed)+"*"+str(hour)+" = "+str(distance))

Explanation:

This prompts the user for speed in mile/hr

speed = float(input("Speed: (mile/hr): "))

This prompts the user for time in hr

time = int(input("Time: (hr): "))

This iterates through the input time

for hour in range(1,time+1):

This calculates the distance covered in each hour

    distance = speed * hour

This prints the distance covered in each hour

    print("Distance: "+str(speed)+"*"+str(hour)+" = "+str(distance))

The _____ Tag surrounds all content that will be visible on your web page for all to users to see on that website.

Answers

Answer:

The body tag

Explanation:

HTML has several tags; however, the tag that handles the description in the question is the body tag.

It starts with the opening tag <body> and ends with closing tag </body>

i.e.

<body>

[Website content goes in here]

</body>

Any text, image, object etc. placed within this tag will be displayed in the website

What are the three general methods for delivering content from a server to a client across a network

Answers

Answer:

Answered below.

Explanation:

The three general methods consist of unicasting, broadcasting and multicasting.

Casting implies the transfer of data from one computer (sender) to another (recipient).

Unicasting is the transfer of data from a single sender to a single recipient.

Broadcasting deals with the transfer of data from one sender to many recipients.

Multicasting defines the transfer of data from more than one sender to more than one recipients.

Jackie used the software development life cycle to create a new game. Jackie ran her code to make sure it worked and had no errors.

Which stage of the software development life cycle is Jackie currently in?

Coding
Maintenance
Planning & Analysis
Testing

Answers

Answer:

She is running to maintenance to make sure everything works

Answer:

She is testing it.

Explanation:

What will the output of the statements below? System.out.println(9%2); System.out.println(12%6); The output of the first statement is * The output of the second statement is​

Answers

Answer:

You get Exact 30 print of that sentence on a comadore 64

Explanation:

Just simple basic science. hope this helps

we need to send 254 kbps over a noiseless channel with a bandwidth of 15 khz. how many signal levels do we need

Answers

Answer:

The level of the signal is 353.85

Explanation:

Data rate determines the speed of the data transmission.

The data rate depends on the following factors

The available bandwidthnumbers of signal levelsthe quality of the channel ( Means the level of noise )

The data is transmitted either from a noiseless channel or a noisy channel.

The given quality of the channel in the question is noiseless.

Use the following formula to calculate the signal levels

Bit rate = 2 x bandwidth x [tex]Log_{2}[/tex] ( signal level )

where

Transmitted Data = 254 kbps = 254,000 bps

Bandwidth = 15 khz = 15,000 hz

Placing values in the formula

254,000 = 2 x 15,000 x [tex]Log_{2}[/tex] ( L )

254,000 = 30,000 x [tex]Log_{2}[/tex] ( L )

254,000 / 30,000 = [tex]Log_{2}[/tex] ( L )

8.467 = [tex]Log_{2}[/tex] ( L )

L = [tex]2^{8.467}[/tex]

L = 353.85 levels

A __________ is the blueprint for __________ having similar attributes and behaviors. signature, objects class, parameters header, objects signature, parameters class, objects

Answers

Answer: E. class, objects

Explanation:

A class is the blueprint for objects having similar attributes.

As much as classifying something means to define it based on the characteristics that is has that are similar to other things in that class, so also is a class here.

A class is the blueprint or rather template for making objects that have similar attributes which means that the class therefore gives the object its various attributes and its behavior.

Authorized agent Confidentiality Integrity Encryption 6:53 PM ______ means that only people with the right permission can access and use information.

Answers

Answer:

The answer is "Confidentiality"

Explanation:

Confidentiality alludes to shielding data from being gotten to by unapproved parties. All in all, solitary the individuals who are approved to do so can access delicate information. Imagine your bank records, You ought to have the option to get to them obviously, and representatives at the bank who are assisting you with an exchange ought to have the option to get to them, yet nobody else ought to. An inability to keep up Confidentiality implies that somebody who shouldn't have access has figured out how to get it, through deliberate act or coincidentally. Such a disappointment of Confidentiality, normally known as a breach  can't be helped. When the secret has been uncovered, it is highly unlikely to un-uncover it.

Assuming your bank records are posted on a public site, everybody can realize your bank account number, balance, and so forth, and that data can't be eradicated from their brains, papers, PCs, and different spots. Virtually all the significant security occurrences reported in the media today include loss of Confidentiality.

Thus, in summary, a breach of Confidentiality implies that somebody accesses data who shouldn't be permitted to.

Write a list comprehension statement to generate a list of all pairs of odd posi

Answers

Answer:

Print([(a,b) for a in range(10) for b in range(10) if (a < b and a%2 == 1 and b%2 == 1)])

Explanation:

Here, we declared a range of value for a and b using a for loop and the range function. The values are the first 10 numeric digits. The we used the if statement to establish our constraints;

In other to ensure that ;

Lower digit is written first ; (a < b) ;

Only odd numbers are considered,

a%2 == 1 ; b%2 == 1 (remainder when a and b are divided by 2 is 1.

Both a and b are declared as a tuple in other to obtain a pair of odd values.

You need to save a document and be absolutely sure that none of the formatting is lost. Which of these document formats would be best?

1) DOC

2) HTML

3) PDF

Answers

In my opinion the one that would be the best is 3. PDF but it could also be 1. DOC

Write a function called is_even that takes one parameter and returns a boolean value. It should return True if the argument is even; it should return False otherwise.

The is_even function should not print anything out or return a number. It should only take in a number and return a boolean.

Note: Be sure to include comments for all functions that you use or create.

For example, if you made a call like

is_even_number = is_even(4)
is_even_number should have the value True.

Once you’ve written this function, write a program that asks the user for integers and prints whether the number they entered is even or odd using your is_even function. You should let the user keep entering numbers until they enter the SENTINEL value.

Here is a sample run of the program:

Enter a number: 5
Odd
Enter a number 42
Even
Enter a number: -6
Even
Enter a number: 0
Done!

(CODEHS, PYTHON)

Answers

def is_even_number(n):

   return True if n % 2 == 0 else False

while True:

   number = int(input("Enter a number: "))

   if number == 0:

       break

   else:

       if is_even_number(number):

           print("Even")

       else:

           print("Odd")

I wrote my code in python 3.8. I hope this helps.

Which 2 problems does the Pay down credit card workflow solve for clients? (Select all that apply) It helps clients stay on top of making payments on time It ensures that payments to credit card accounts are categorized correctly It provides a lower rate than most credit cards to qualified small businesses It uses language that non-accountants can understand

Answers

Answer:

B. It ensures that payments to credit card accounts are categorized correctly

D. It uses language that non-accountants can understand

Explanation:

Pay down credit card workflow is a new feature that makes entering records in QuickBooks easier for users. The two prime benefits of this workflow are;

1. It ensures that payments to credit card accounts are well categorized well. Without this feature, users most times find it difficult to enter records correctly or they tend to duplicate entries. This new feature obtains vital information that helps the software to correctly credit the accounts.

2. It uses language that non-accountants can understand. This simplifies the process and makes it easier for the user to enter the right data that would help the software to correctly credit the accounts.

discuss how sentiment analysis works using big data?

Answers

Answer:

sentiment analysis is the process of using text analytics to mine various of data for opinions. often sentiment analysis is done on the data that is collected from the internet & from various social media platforms.

Other Questions
What is the truth in The Tell-Tale Heart? HELPPPchoose the option that correctly use the apostrophe to show a plural possessive the ___ favorite spot in the house was the pantry micesmicesmixed Find mZ1 and mZ2 .I cant figure it out Write an expression for the sequence of operations described below.subtract 4 from the sum of 2 and y What word can i make with these letters L O C S Y U H L ??? The distance covered by three runners and the time they spent running is shown in the table. If Rudy continues at the rate in the table, how far will he run in 2 hours?Cody= in 1/4 hour he can run 2 milesYIn=1 1/2 hour he can run 11 1/4 miles RUdy= 1 1/2 hour can run 12miles Solve for x/4+12=-12 if 50% is 100 what is 25%, 75%, and 100% i really need help so pls help me Why was the date of inauguration changed after the 1933 inauguration?Please help Write the percent as a decimal.47.63%. A funnel shaped low pressure system that is typically associated with strong thunderstorms is a(n)_______. * If Mikael makes a deal with his bank every time he spends $10,000 from his bank account which has $10,000 dollars currently and his bank deposits $30,000 into this same account per day. How many days would it take Mikael to accumulate at least $1,000,000 hey beautiful. I will try to give brainliest to whoever can answer this CORRECTLY thanks in advanced. You need to save a document and be absolutely sure that none of the formatting is lost. Which of these document formats would be best?1) DOC2) HTML 3) PDF Connotation does not refer to:A. the meaning of a word that changes depending on someone'sexperiences.B. the meaning of a word that changes depending on someone'sculture.C. the dictionary definition of a word.O D. the feelings and emotions attached to a word. Which statement best explains why the author chooses to include a flashback in this passage?A. to show how immature George was in schoolB. to show how the narrator overcame his conflict with GeorgeC. to show why George was threatened by another studentD. to show why the narrator was such a good student in school A girl has as many brothers as sisters, but each brother has only half as many brothers as sisters. How many brothers and sisters are there in the family? (This is actually math) Crossing-over occursa. during prophase 2.c. during prophase I.b. during fertilization.d. at the centromere Which of the following conditions does not affect equilibrium?A. Particle SizeB. None of theseC. ConcentrationD. Pressure