NAME SEARCH In the Chap07 folder of the Student Sample Programs, you will find the following files: GirlNames.txt—This file contains a list of the 200 most popular names given to girls born in the United States from 2000 through 2009. BoyNames.txt—This file contains a list of the 200 most popular names given to boys born in the United States from 2000 through 2009. Create an application that reads the contents of the two files into two separate arrays or Lists. The user should be able to enter a boy’s name, a girl’s name, or both, and the application should display messages indicating whether the names were among the most popular.

Answers

Answer 1

Answer:

Explanation:

I do not have the files listed in the question so I have made two test files with the same names. This code is written in Python, we are assuming that the names on each file are separated by newlines.

f1 = open("GirlNames.txt", 'r')

f1_names = f1.read()

f1_names_list = f1_names.split('\n')

f2 = open("BoyNames.txt", 'r')

f2_names = f2.read()

f2_names_list = f2_names.split('\n')

print(f1_names_list)

print(f2_names_list)

boy_or_girl = input("Would you like to enter a boy or girl name or both: ").lower()

if boy_or_girl == 'boy':

   name = input("Enter name: ")

   if name in f2_names_list:

       print("Yes " + name + " is in the list of most popular boy names.")

   else:

       print("No, it is not in the list")

elif boy_or_girl == 'girl':

   name = input("Enter name: ")

   if name in f1_names_list:

       print("Yes " + name + " is in the list of most popular girl names.")

   else:

       print("No, it is not in the list")

elif boy_or_girl == 'both':

   girlname = input("Enter Girl name: ")

   if girlname in f1_names_list:

       print("Yes " + girlname + " is in the list of most popular girl names.")

   else:

       print("No, it is not in the list")

   boyname = input("Enter name: ")

   if boyname in f2_names_list:

       print("Yes " + boyname + " is in the list of most popular girl names.")

   else:

       print("No, it is not in the list")

else:

   print("Wrong input.")

NAME SEARCH In The Chap07 Folder Of The Student Sample Programs, You Will Find The Following Files: GirlNames.txtThis

Related Questions

Differences between dot_mattix printer and a line printer

Answers

Answer:

Difference Between Dot Matrix and Line Printer is that Dot-matrix printer produce printed images, they produce image when tine wire pins on a print head mechanism strike an inked ribbon. While Line printer is a type of impact printer which is high-speed and printer an entire line at a time.

Explanation: Hope this helps!

Three reasons why users attach speakers to their computer

Answers

For media sound
For the game's multimedia sound
For essential system sound

Write a program named HoursAndMinutes that declares a minutes variable to represent minutes worked on a job, and assign a value to it. Display the value in hours and minutes. For example, 197 minutes becomes 3 hours and 17 minutes.'

Answers

Answer:

Explanation:

The following code is written in Python, it asks the user for the number of minutes worked. Divides that into hours and minutes, saves the values into separate variables, and then prints the correct statement using those values. Output can be seen in the attached image below.

import math

 

class HoursAndMinutes:

   min = input("Enter number of minutes worked: ")

   hours = math.floor(int(min) / 60)

   minutes = (int(min) % 60)

   print(str(hours) + " hours and " + str(minutes) + " minutes")

If a system contains 1,000 disk drives, each of which has a 750,000- hour MTBF, which of the following best describes how often a drive failure will occur in that disk farm:

a. once per thousand years
b. once per century, once per decade
c. once per year, once per month
d. once per week
e. once per day
f. once per hour
g. once per minute
h. once per second

Answers

Answer:

once per month

Explanation:

The correct answer is - once per month

Reason -

Probability of 1 failure of 1000 hard disk = 750,000/1000 = 750 hrs

So,

750/24 = 31.25 days

⇒ approximately one in a month.

Which language paradigm interacts well with database systems in business environments that use SQL? (I WILL GIVE BRAINLIEST TO THE RIGHT ANSWER

aspect-oriented
data-oriented
fourth-generation
logic-based

Answers

Answer:

I think it is fourth-generation.

Explanation:

which of the following is an example of how to effectively avoid plagiarism

Answers

Answer:

You didn't list any choices, but in order to avoid all plagiarism, you must focus on rewriting the following script/paragraph in your own words. This could be anything from completely changing the paragraph (not the context) to summarizing the paragraph in your own words.

Answer:

Simon cites anything that he didnt know before he read it in any given source

Explanation:

a p e x

11 Select the correct answer. Which external element groups items in a design?
A coloring items
B. sorting items
c. underlining items
D directing items blurring items​

Answers

Answer:

C

Explanation:

Three reasons why users attach speakers to their computers.

Answers

Answer:

Iv'e answered this question 2 times already lol. The purpose of speakers is to produce audio output that can be heard by the listener. Speakers are transducers that convert electromagnetic waves into sound waves. The speakers receive audio input from a device such as a computer or an audio receiver.

Explanation: I hope this helps!

Which of the following statements are true about the code shown below in the class named Quiz? (Select all that apply.)

public class Quiz {
public static void printOdd(int n) {
for(int i = 0; i < n; i++){
if(i % 2 != 0)
System.out.println(i);
else
System.out.println(i+1);
}
}

public static void main(String arg[]) {
printOdd(5);
}
}

a. A value of 5 will be substituted for the parameter during the execution of the printOdd method.
b. This method will print a list of all even numbers less than n.
c. This method when executed as called by main will print out 5 lines of output.
d. This method when executed as called by main will print out 1 line of output.
e. A value of 5 is being returned to main from the printOdd method after execution.

Answers

Answer:

a. and c.

Explanation:

The snippet of code provided will print out all of the odd numbers between 0 and the value passed as a parameter. If a number is even, it will add 1 to the even number and print out the new value. Therefore, there will be a total of outputs as the number passed as an argument. For example, this code will output a total of 5 lines of output. Therefore, the statements that would be true in this question would be the following...

a. A value of 5 will be substituted for the parameter during the execution of the printOdd method.

c. This method when executed as called by main will print out 5 lines of output.

Suppose you are a merchant and you decide to use a biometric fingerprint device to authenticate people who make credit card purchases at your store. You can choose between two different systems: System A has a fraud rate of 1% and an insult rate of 5%, while System B has a fraud rate of 5% and an insult rate of 1%. Fraud rate is the chance that another person is incorrectly authenticated as you, while insult rate is the chance that you are not successfully authenticated as you.

Required:
Which system would you choose and why?

Answers

The choice between biometric fingerprint systems with varying fraud and insult rates depends on the priorities and risks of the merchant and their business.

Give reasons why a particular system would be chosen.

When choosing between the two biometric fingerprint systems, it's important to consider the trade-off between the fraud rate and the insult rate.

System A has a lower fraud rate of 1%, which means that there is a lower chance that another person is incorrectly authenticated as a legitimate user. However, System A has a higher insult rate of 5%, which means that there is a higher chance that the legitimate user is not successfully authenticated.

On the other hand, System B has a higher fraud rate of 5%, which means that there is a higher chance that another person could be incorrectly authenticated as a legitimate user. However, System B has a lower insult rate of 1%, which means that there is a lower chance that the legitimate user is not successfully authenticated.

Ultimately, the decision of which system to choose would depend on the priorities and risks associated with the specific merchant and their business. They would need to weigh the potential financial loss from fraud against the inconvenience or loss of business from customers who are not successfully authenticated.

To learn more about biometric, visit:

https://brainly.com/question/20318111

#SPJ1

e Highlight
fogy
ст)
4 uses of information
communication technology in the health sector​

Answers

Answer: See explanation

Explanation:

The uses of information

communication technology in the health sector​ include:

• Improvement in the safety of patients through direct access to case story.

• Keeping track of the progress of the patient.

• Checking of the treatments for a disease it illness online.

• It's also vital for the electronic storage of the medical data.

Provide examples of how information technology has created an ethical dilemma that would not have existed before the advent of I.T.

Answers

Hrhdhhdhdjhdhcnbcgfgbsbnenwnsn

Consider a model of a drone to deliver the orders of the customers within the range of 20 km of the coverage area.

Identified at least 5 factors (inputs) required to experiment with the above mention system model (e.g. speed of the drone).


Write down the levels (range or setting) for each factor mentioned above. (e.g. speed ranges from 10km/h to 30km/h).


On what responses (results) will you analyses the experiment’s success or failure (e.g. drone failed to deliver the package on time), mention at least 3 responses

Answers

Answer:

Explanation:

suna shahani kesa a ..

Is the ASSIGN statement a data entry statement, true or false?

Answers

I need the imagine to see so I will tell you the answer

1. Programmable logic controllers (also called
PLCs) are used to control machines and other
industrial applications with
instead
of using hard-wired devices.

Answers

Answer:

A programmable logic controller (PLC) or programmable controller is an industrial digital computer that has been ruggedized and adapted for the control of manufacturing processes, such as assembly lines, robotic devices, or any activity that requires high reliability, ease of programming, and process fault diagnosis.

Explanation:

Write a C++ function with the following signature: void readAndConvert() The function takes no parameters and returns no value. Instead, it reads its input from std::cin and writes its output to std::cout. Both the input and output are information describing a sequence of stock trades, albeit in different formats. Input format The input will be formatted according to the following specification. You may freely assume that the input will be in the format described here; it doesn't matter what your function does with input that doesn't meet those requirements. • The first line of the input will contain a positive integer, which will specify the number of trades whose information will be present in the input. • The second line of the input will contain the stock's symbol, which is a sequence of uppercase letters. • The third line of the input will contain a brief description of the stock, which is any arbitrary sequence of characters. • After that will be one line for each trade - so the integer on the first line tells you how many more lines there will be — which will contain three pieces of information separated by spaces! • A positive integer specifying the number of shares traded. o The price paid for each share, which is a number that will always have exactly two digits after the decimal point. • A sequence of lowercase letters that specifies a confirmation number for the trade. One example input that follows that format is as follows, though your function would need to work on any input that follows the specification, not just the one example. BOO Forever Boo Enterprises 100 50.00 barzxfq. 200 60.75 hhpncstvz 150 7.90 cjjm 175 100.15 fryzyt Output format Your function's output is a reorganization of the information from the input, which you would write in the following format. • The first line of output would contain the description of the stock, followed by a space, followed by the symbol surrounded by parentheses. • Each subsequent line of output describes one of the trades from the input, in the following format: o The confirmation number, followed by a colon and a space, followed by the integer number of dollars spent in the order (i.e., the number of shares times the price per share, always rounding to the floor of the number). The correct output for the example input above is as follows. Forever Boo Enterprises (BOO) barzxfq: 5000 hhpncstvz: 12150 cjjm: 1185 fryzyt: 17526 It is irrelevant whether your program prints all of the output only after reading the input, or whether it prints the output while it reads input; this is your choice. The only requirement is that your output meets the formatting requirements.

Answers

Answer:

The function is as follows:

void readAndConvert(){

   int n; string symbol,name;

   cin>>n;

   cin>>symbol;

   cin.ignore();

   getline (cin,name);

   vector<string> trades;

   string trade;

   for (int inps = 0; inps < n; inps++){

       getline (cin,trade);

       trades.push_back(trade);}

   

   cout<<name<<" ("<<symbol<<")"<<endl;

   for (int itr = 0; itr < n; itr++){

       string splittrade[3];        int k = 0;

       for(int j=0;j<trades.at(itr).length();j++){

           splittrade[k] += trades.at(itr)[j];

           if(trades.at(itr)[j] == ' '){

               k++;    }}

cout<<splittrade[2]<<": "<<floor(stod(splittrade[1]) * stod(splittrade[0]))<<endl;        }

   }

Explanation:

See attachment for complete program where comments are used to explain each line

4. What is a motion path?​

Answers

Answer:

A motion path is basically a CSS module that allows authors to animate any type of graphical object along, what is called a custom path ... Next, you would then animate it along that path just by animating offset - distance, However, authors can choose to rotate it at any particular point using the offset - rotate.

A motion Path is how you track the state of motion

a buffer storage that improve computer performance by reducing access time is​

Answers

Cache memory

Hope it helps

Which best describes the possible careers based on
these employers?
Yoshi worked in Logistics Planning and Management
Services, Dade worked in Sales and Service, Lani
worked in Transportation Systems/Infrastructure
Planning, Management, and Regulation, and Miki
worked in Transportation Operations.
Yoshi worked in Transportation Operations, Dade
worked in Logistics Planning and Management
Services, Lani worked in Sales and Service, and Miki
worked in Transportation Systems/Infrastructure
Planning, Management, and Regulation
Yoshi worked in Health, Safety, and Environmental
Management, Dade worked in Transportation
Operations, Lani worked in Facility and Mobile
Equipment Maintenance, and Miki worked in
Warehousing and Distribution Center Operations.

Answers

Answer:

It's c bodie I'm fr on this question rn lol

Answer:

the guy above is right, its c

Explanation:

edge 2021

write a c program to insert and delete values from stack( to perform pop and push operations) using an array data structure

Answers

Answer:

How to implement a stack in C using an array?

A stack is a linear data structure that follows the Last in, First out principle (i.e. the last added elements are removed first).

This abstract data type​ can be implemented in C in multiple ways. One such way is by using an array.

​Pro of using an array:

No extra memory required to store the pointers.

Con of using an array:

The size of the stack is pre-set so it cannot increase or decrease.

Which command will allow you to underline and boldface text on multiple pages using fewer mouse clicks?

Animation Painter

Animation

Format Painter

Answers

ANSWER:

Format Painter

mark me brainliest please

Answer:

Its D

Explanation:

Edg 2023

The American Red Cross wants you to write a program that will calculate the average pints of blood donated during a blood drive. The program should take in the number of pints donated during the drive, based on a seven hour drive period. The average pints donated during that period should be calculated and displayed. Use a loop in the program to run multiple times.

Answers

Answer:

The program in Python is as follows:

num_pints = int(input("Pints: "))

sum_pints = 0

for i in range(num_pints):

   blood = int(input("Blood Donated: "))

   sum_pints += blood

print("Average: ",sum_pints/num_pints)

Explanation:

This prompts the user for number of pints

num_pints = int(input("Pints: "))

This initializes the sum to 0

sum_pints = 0

This iterates through the number of pints

for i in range(num_pints):

This gets input for each blood donated

   blood = int(input("Blood Donated: "))

This adds up all blood donated

   sum_pints += blood

This calculates and prints the average

print("Average: ",sum_pints/num_pints)

Cuál es el objetivo principal de una clave primaria?

Answers

La clave principal le permite crear un identificador único para cada fila de su tabla. Es importante porque le ayuda a vincular su tabla a otras tablas (relaciones) utilizando la clave principal como vínculos.

The divBySum method is intended to return the sum ofall the elements in the int arrayparameter arr that are divisible by the intparameter num. Consider the following examples, in whichthe array arrcontains {4, 1, 3, 6, 2, 9}.The call divBySum(arr, 3) will return 18,which is the sum of 3, 6, and 9,since those are the only integers in arr that aredivisible by 3.The call divBySum(arr, 5) will return 0,since none of the integers in arr are divisibleby 5.Complete the divBySum method using anenhanced for loop. Assume that arr isproperly declared and initialized. The method must use anenhanced for loop to earn full credit./** Returns the sum of all integers inarr that are divisible by num* Precondition: num > 0*/public static int divBySum(int[] arr, int num)

Answers

Answer:

Explanation:

The following program is written in Java and creates the divBySum method using a enhanced for loop. In the picture attached below I have provided an example of the output given if called using the array provided in the question and a divisible parameter of 3.

public static int divBySum(int[] arr, int num) {

       int sum = 0;

       for (int x : arr) {

           if ((x % num) == 0) {

               sum += x;

           }

       }  

       return sum;

   }

Explain what an IM is, and what is the technology shown in the accompanying figure

Answers

Answer: Instant Message

Explanation:

Answer:the technology that is shown is a ch't rooms, a website or application that permits users to ch't with others who are online at the same time. as you type others can see what you type may i get brainiest plz

Explanation:

I
Moving to another question will save this response
uestion 1
A field in the logical design of a database corresponds to a row in the physical table of a relational database.
O True
O False
Moving to another question will save this response
Type here to search
o​

Answers

Answer:

False.

Explanation:

A database management system (DBMS) can be defined as a collection of software applications that typically enables computer users to create, store, modify, retrieve and manage data or informations in a database. Generally, it allows computer users to efficiently retrieve and manage their data with an appropriate level of security.

A data dictionary can be defined as a centralized collection of information on a specific data such as attributes, names, fields and definitions that are being used in a computer database system.

This ultimately implies that, a data dictionary found in a computer database system typically contains the records about all the data elements (objects) such as data relationships with other elements, ownership, type, size, primary keys etc. This records are stored and communicated to other data when required or needed.

In database management, the term "schema" is used to denote a representation of data.

A database schema is a structure which is typically used to represent the logical design of the database and as such represents how data are stored or organized and the relationships existing in a database management system. There are two (2) main categories of a database schema; physical database schema and logical database schema.

A relational database can be defined as a type of database that is structured in a manner that there exists a relationship between its elements.

In the physical table of a relational database, a record used in the logical design of a database corresponds to a row.

Can someone help me with this lab assignment? I really do not know what should I do?
This assignment
The program you wrote in Stacks 1 is incomplete. Without a destructor it creates a memory leak. A destructor has been defined in this program but it is incorrect. To visualize how the destructor works, a cout statement has been added. Fix the errors, including the cout statement, to display the value in each node of the stack before releasing the memory.
Write a loop in main() to enter an unknown number of positive integers. The loop stops when you enter 0 or a negative number. As you are entering integers, they are to be pushed onto a stack.
Ex.: If the user enters '10 20 30 -1` the output (from the destructor) should be:
30 - deleted!
20 - deleted!
10 - deleted!
Empty stack!
Ex.: If the user enters '-1` the output should be:
Empty stack!
This is the code:
#include
using namespace std;
class Stack_int
{
private:
// Structure for the stack nodes
struct StackNode {
int value; // Value in the node
StackNode *next; // Pointer to next node
};
StackNode *top; // Pointer to the stack top
int length; // Number of nodes
public:
Stack_int(){ top = NULL; length = 0; } //Constructor
~Stack_int(); // Destructor
// Stack operations
// bool isEmpty();
bool push(int);
// int pop();
// int peek();
// int getLength();
};
/**~*~*
Member function push: pushes the argument onto the stack.
*~**/
bool Stack_int::push(int item)
{
StackNode *newNode; // Pointer to a new node
// Allocate a new node and store num there.
newNode = new StackNode;
if (!newNode)
return false;
newNode->value = item;
// Update links and counter
newNode->next = top;
top = newNode;
length++;
return true;
}
/**~*~*
Destructor
*~**/
Stack_int::~Stack_int()
{
StackNode *currNode;
// Position nodePtr at the top of the stack.
currNode = top;
// Traverse the list deleting each node.
while (currNode)
{
cout << currNode->value << " - deleted!" << endl;
delete currNode;
currNode = NULL;
currNode = currNode->next;
}
cout << "Empty stack!" << endl;
}
int main() {
Stack_int s;
int item;
return 0;
}

Answers

Answer:

your question is too long to read

Explanation:

try explaining it in fewer words

The new software organization requires a new point of sale and stock control system for their many stores throughout Pakistan to replace their aging mini-based systems.
A sales assistant will be able to process an order by entering product numbers and required quantities into the system. The system will display a description, price, and available stock. In-stock products will normally be collected immediately by the customer from the store but may be selected for delivery to the customer's home address for which there will be a charge. If stock is not available, the sales assistant will be able to create a backorder for the product from a regional warehouse. The products will then either be delivered directly from the regional warehouse to the customer's home address, or the store for collection by the customer. The system will allow products to be paid for by cash or credit card. Credit card transactions will be validated via an online card transaction system. The system will produce a receipt. Order details for in-stock products will be printed in the warehouse including the bin reference, quantity, product number, and description. These will be collected by the sales assistant and given to the customer. The sales assistant will be able to make refunds, provided a valid receipt is produced. The sales assistant will also be able to check stock and pricing without creating an order and progress orders that have been created for delivery.
You need to answer the following questions.
1. Which elicitation method or methods appropriate to discover the requirement for a given scenario system to work efficiently, where multiple sales and stock points manage. Justify your answer with examples.
2. Identify all stakeholders for a given scenario according to their roles and responsibilities with suitable justifications.
3. Specify functional users and systems requirements with proper justifications.

Answers

Answer:

hdyfhwjhsucndiskfbvienucuit

in the lungs,blood picks up carbon dioxide and releases oxygen true or false

Answers

Answer:

false

Explanation:

plants do that, they absorb carbon dioxide and then they create oxygen, then humans breathe the oxygen and makes CB

Create a public class called Exceptioner that provides one static method exceptionable. exceptionable accepts a single int as a parameter. You should assert that the int is between 0 and 3, inclusive.
If the int is 0, you should return an IllegalStateException. If it's 1, you should return a NullPointerException. If it's 2, you should return a ArithmeticException. And if it's 3, you should return a IllegalArgumentException.

Answers

Answer:

// Begin class declaration

public class Exceptioner {

   

   // Define the exceptionable method

   public static void exceptionable(int number){

      //check if number is 0.

       if(number == 0) {

           //if it is 0, return an IllegalStateException

           throw new IllegalStateException("number is 0");

       }

      //check if number is 1        

       else if(number == 1) {

           //if it is 1, return a NullPointerException

           throw new NullPointerException("number is 1");

       }

      //check if number is 2        

       else if(number == 2) {

           //if it is 2, return an ArithmeticException

           throw new ArithmeticException("number is 2");

       }

       

      //check if number is 3

       else if(number == 3) {

           //if it is 3, return an IllegalArgumentException

           throw new IllegalArgumentException("number is 3");

       }

   }

}

Sample Output:

Exception in thread "main" java.lang.ArithmeticException: number is 2                                                                          

       at Main.exceptionable(Main.java:26)                                                                                                    

       at Main.main(Main.java:36)  

Explanation:

The code is written in Java with comments explaining important parts of the code.

A sample output for the call of the method with number 2 is also provided. i.e

exception(2)

gives the output provided above.

Other Questions
Ayden invested $560 in an account in the year 1990, and the value has been growing exponentially at a constant rate. The value of the account reached $700 in the year 1994. Determine the value of the account, to the nearest dollar, in the year 2002. What are the universal beliefs in hinduism? REPORTING ALL SCAMS. PLEASE HURRY!! ASAP. GIVING BRAINLIEST!Complete the sentence. Remember to spell correctly. _______is the largest country in North America. 2. What element is found in compounds that control all chemical changes in your body? where should I add the punctuation and the changes Which number is located between 19 and 20 on a number line?A. (298)B. (340)C. (391) D. (402) What is the product?5-2.-62-78-52.6.-2-3A4 -3-71Mark this and retum Can somone Provide some assistance? Your market value is determined by what you bring to the job.TrueFalse what is one link between the skeletal system and the muscular system? What is the speed of a wave in (m/s) with a 5 meter wavelength and a period of 20 seconds? Pls help need to complete today 12 people are waiting at a subway stop to get on the train. However, the train only has space for 9 people to board. How many different combinations ofpeople can get on the train?O 2201.32013,305,600O 79.833.600 HELP PLZ THIZ WAS DUE 2 hours ago! (now 3) Looking at the perspectives of those who favor middle school homework and those who oppose it, we can see one thing that they have in common is _________. A. a focus on student achievement B. wanting what is best for students C. desiring that students have plenty of free time D. a strong interest in how US education ranks worldwide Please select the best answer from the choices provided what is intagliowhat is intaglio Qual a descoberta que marcou uma grande mudana na alimentao dos grupos humanos caadores e coletores. Servia na preparao de alimentos e na defesa contra grandes animais: What was Transcendentalism? How did it impact the United States? (Be sure to talk about Henry David Thoreau, Ralph Waldo Emerson, and civil disobedience). do you like it? i work hard by:rankless is it true or false??