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
Vedmedyk [2.9K]
2 years ago
6

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.
Computers and Technology
1 answer:
tankabanditka [31]2 years ago
5 0

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

<em>for i in range(numnames):</em>

<em>    name = input(nametitle[i])</em>

<em>    names.append(name)</em>

   

The following instructions print the user fullnames

<em>print("Your fullname is: ",end=" ")</em>

<em>for i in names:</em>

<em>    print(i,end=" ")</em>

You might be interested in
3. The following code will not display the results expected by the programmer. Can
Elena L [17]

Answer:

ion k

Explanation:

7 0
3 years ago
If you’re looking for a quick, high-level overview of common metrics such as audience growth, website traffic, and total posts,
salantis [7]

Google Analytics, this is a common one but there are others that do the same thing.

7 0
3 years ago
When there is uncertainty of the product quality, buyers should not anticipate that the temporary warehouse seller of unbranded
Westkost [7]

Answer:

Offer several prices and qualities.

Explanation:

When there is uncertainty of the product quality, buyers should not anticipate that the temporary warehouse seller of unbranded computer equipment will deliver high quality because they will actually offer several prices and qualities.

In the essence, buyers will need to consider the value they are getting for a price they pay. There will be huge variety so the more price an equipment has, the more likely it has the chance that it's one of the best quality and vice versa also holds true.

6 0
3 years ago
Write a C++ program to grade the answers to a true-false quiz given to students in a course. The quiz consists of 5 true-false q
Eddi Din [679]

The quiz program is an illustration of loops and conditional statements

  • Loops are used to perform repetition
  • Conditional statements are used to make decisions

<h3>The quiz program</h3>

The quiz program written in C++, where comments are used to explain each action is as follows:

#include <iostream>

using namespace std;

int main(){

   //This prints the instruction

   cout<<"Enter T/t for True; F/f for False\n";

   //This initializes the question

   string questions[5] = { "Q1", "Q2", "Q3", "Q4", "Q5"};

   //This initializes the correct options

   char options[5] = { 'T','T','F','F','T'};

   //This declares the user response

   char opt;

   //This initializes the score to 0

   int score = 0;

   //This loop is repeated 5 times

   for (int i = 0; i < 5; i++){

       //This prints the current question

       cout << i + 1 <<". "<<questions[i]<<"\nAnswer: ";

       //This gets the user response

       cin>>opt;

       //If the user response is correct

       if(toupper(opt) == options[i]){

           //The score is incremented by 2

           score+=2;

       }

   }

   //This prints the total score

   cout<<"Score: "<<score;

   return 0;

}

Read more about loops at:

brainly.com/question/19347842

7 0
2 years ago
. The BEST description of a proprietary database is one that
AVprozaik [17]
Is free to the public
8 0
3 years ago
Other questions:
  • ________ computers are specially designed computer chips that reside inside other devices, such as a car. Select one: A. Tablet
    11·2 answers
  • Abram was asked to explain to one of his coworkers the XOR cipher. He showed his coworker an example of adding two bits, 1 and 1
    7·1 answer
  • Which of the following is NOT a Boolean Search term used to refine search engine results? A. AND B. With C. OR D. NOT
    14·2 answers
  • In an inheritance situation, the new class that you create from an existing class is known as the:
    5·1 answer
  • In the source-code file containing a class's member function definitions, each member function definition must be tied to the cl
    13·1 answer
  • Sophie Black works as a computer programmer for a software company. Her boss, Mike Jones, is responsible for developing a new so
    8·1 answer
  • How are IP addresses usually written?
    7·1 answer
  • Which picture should i put as my profile picture.
    15·2 answers
  • A _____ can be used to create and test prototypes, develop interfaces, and simulate factory layouts and assembly lines, without
    10·1 answer
  • 1110011*110011 binary multiplication
    9·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!