Write a program that initialises a vector with the following string values: "what" "book" "is" "that" "you" "are" "reading". Display the contents of the vector on the screen to the user as a question and read in the name of the book the user is reading (you can decide what it will be). Have the program add the name of the book to the vector, word by word. For example, if I am reading "How to learn C++", the program should add the words, "How" "to" "learn" "C++", one by one to the vector. Display the new vector. Remember to plan your program!
Q: Convert the following grammar into Chomsky Normal Form (CNF):
A: Consider the given productions: S→ScS | aSS |aAbA | Bb A→aA | λ B→ Bb | b
Q: How advances in computer technology are weakening our cultural standards and allowing people to take…
A: Introduction: Advances in computer technology. In the last decade, computer technology has improved…
Q: Develop an activity diagram of the following scenario The 2021 IEEE 23rd International Multitopic…
A: It is one of the UML diagrams under behavioral category. ⦁ It is used to explain the control flow…
Q: ow do you test the CPU and battery in iOS testing?
A: Introduction: Analyze battery utilisation on applications that utilise an excessive amount of…
Q: Discuss the significance of using charts, images, and graphics to improve a workbook's visual…
A: Introduction: The workbook is a collection of one or more worksheets that are used to enter data and…
Q: can you please include in the code something that outputs the row echelon form and the reduced row…
A: According to the information given:- We have to find out the output value of row echelon form and…
Q: There are only three basic constructs in Prolog: facts, rules, and queries. A collection of facts…
A:
Q: Kirana Hospital needs a program to compute and print a bill statement for each patient. The charges…
A: Program: #include <iostream>using namespace std;int main() { int n; char…
Q: Q2: Write a program to calculate the average of student who has registered n number of courses.
A: We will explain code with output.
Q: You are given the grade scale : A = 90, B = 80, C= 60, D = 55, F = 40. Using Dictionary, write a…
A: Hello Student I will provide the code and as well as output
Q: 1. When dose buffer overflows occur Buffer overflows occurs when we do not properly account for the…
A: Buffer overflows occurs when we do not properly account for the size of the data input into an…
Q: ze of my multiplier if I want a max
A: Introduction: Below describe the the size of my multiplier if I want a maximum output of 6-bits
Q: What are the advantages of multi quadrant drive
A: Hello student
Q: The following table shows the memory hierarchy for a 2 GHz processor with the following information:…
A:
Q: ut below. You have to c
A: I have provide code below for this output:
Q: This structure is the best model for describing the chapters and sections and subsections of a…
A: A Queue is a direct construction which follows a specific request where the tasks are performed. The…
Q: I need ideas for a Python programming project that includes the handling of an input file (data or…
A: Python programming for handling input file
Q: The implementation of processes by operating systems is beyond the scope of our investigation.
A: Introduction: Determining which computer operating systems to utilise and how to put procedures into…
Q: Write down the values of Carry, Overflow, Zero, Sign, Auxiliary Carry, Parity flag after each…
A: answer starts from step 2
Q: Write a python program to get the binary of a user entered number without using loops, recursion and…
A: print("Enter a Number: ", end="")Enum = int(input()) bnumber = 0mul = 1while Enum>0: rem =…
Q: To distribute an inheritance to VB Question: Write a program in the language of two people in a 1:3…
A: ANSWER:
Q: Write a C programming to find out maximum and minimum of some values using function which will…
A: The question is to write C code for the given problem.
Q: What happens to the user programme if an interrupt occurs and there is no interrupt handler in the…
A: Introduction: An interrupt is the processor's response to any event that necessitates software…
Q: 2) Compute data sent for a bit stream of 101011 with CRC using a generator 1010 1. Find the CRC bits…
A: Hello student I will provide my own hand-written solution for making you more clear on this…
Q: What are the roles of the approval committee during the different SDLC phases ?
A: ANSWER:
Q: ame, address, city, zip, phone number, email, hourly rate, start date, end date, and number of hours…
A: I have used multi-level inheritence logic to make your program, Kindly check the attached code and…
Q: Give a succinct explanation of how the Turing test contributes to the evolution of AI-based…
A: Introduction: Artificial intelligence (AI) researchers use the Turing Test to ascertain whether or…
Q: Describe how a decompiler translates machine code into a form that is close to the original source…
A: Describe how a decompiler translates machine code into a form that is close to the original source…
Q: Write a program to calculate the average o has registered n number of courcor
A: The code is below :
Q: A petroleum cut has the following TBP Distillation data: Volume % distillate 0 10 30 50 70 90 95…
A:
Q: What is the linux logging feature that will provide email details? Which facility.priority (provide)…
A: Introduction: The application or process identification used to characterise the application or…
Q: Explain why an acquisition hash would be the same and why they would be different in EnCase.
A: According to the information given:- We have to define why an acquisition hash would be the same and…
Q: 2. Which command is used to list the attributes of a file? a) cp b) list c) Is d) attr
A: 2.Which command is used to list the attributes of a file? a) cp b) list c) Is d) attr Answer : c)…
Q: C# Password Generator: The program depicts a simple application of a password generator that…
A: It is defined as a general-purpose, object-oriented programming language. It is one of the most…
Q: Why does the insertion sort outperform the sorted group in efficiency? Specify just one cause.
A: Answer: Insertion sort: In comparison to bigger items, this sorting method performs better on…
Q: Simple System Design for chat message app
A: A chat application fills various roles for various individuals. It is critical to make certain about…
Q: Give a UNIQUE (NON EXISTING) application/device that involved IMAGE or AUDIO Processing. Define the…
A: Before going on the application first let us understand what is image processing and Audio…
Q: Six components comprise the computer communication system.
A: Introduction: The machine communication network connects several computers, from which a user may…
Q: Write a program in the language of two people in a 1:3 ratio, if the heir is male, the share is…
A: Input : Heir type Amount Output : Share of parents and heir
Q: What is in artificial neural network, and how does it work?
A: Introduction: An artificial neural network (ANN) in computing is a computer system component that…
Q: Create a userform with two sets of option boxes. Each set should be within a frame (Select frame…
A: how to add VBA form to excel Go to Developer -> Visual Basic from menu bar ( form will appear)…
Q: Draw the waveform for the data 1100111010 using the following encoding schemes: (i) Unipolar NRZ ()…
A:
Q: Read an array of given length Read length of an array as N and read N elements to store in array A.…
A: Java code for reading array of given length: import java.util.*;public class Main{ public static…
Q: Find the PA of the memory location and its contents after the execution of the following assuming…
A: Given: DS=1512h. MOV AL, 99h MOV [3518], AL
Q: Write a python program to get the binary of a user entered number without using loops, recursion and…
A: * Python Code * print("Enter a number: ", end="") enum = int(input()) binnumber = 0 multi =…
Q: Determine the time complexity function of the program snippet below, int f1(int n) { if (n = 1)…
A: The correct answer for the given question is given in the following steps for your reference.
Q: Write down the values of Carry, Overflow, Zero, Sign, Auxiliary Carry, Parity flag after each…
A: When a particular Flag is set?? Carry Flag : It is set when the result is more than n bits Overflow…
Q: Give an example of a drawback of utilizing Flash on a website.
A: Introduction: Flash is a multimedia platform used to add animation, video, and interactivity. Flash…
Q: A .You can use an ELSE clause without an IF structure. Select one: True False B. It is often…
A: Question A: An if statement can be written without an else statement when we do not need the case of…
Q: Why do you think that the method area of a JVM is shared by all threads running in the virtual…
A: Java Virtual Machine(JVM) => JVM drives the Java Code. => It converts Java bytecode into…
Step by step
Solved in 2 steps with 1 images
- In PYTHON Write a function that prints all elements of a vector from the first element up to the first occurrence of the element having value equal to a provide number Use while loop(s) Function Name:print_up_to_value Parameters:a_vector,a_value Return:none Example: Input: my_vector = [5,6,7,8,9,5,6,7,8,9] Invokefunction:print_up_to_value(my_vector,7) Output:[5,6,7]Create a program in C++ that does the following: (1) Prompt the user to input five pairs of numbers: A player's jersey number (0 - 99) and the player's rating (1 - 9). Store the jersey numbers in one int vector and the ratings in another int vector. Output these vectors (i.e., output the roster). Ex: Enter player 1's jersey number: 84 Enter player 1's rating: 7 Enter player 2's jersey number: 23 Enter player 2's rating: 4 Enter player 3's jersey number: 4 Enter player 3's rating: 5 Enter player 4's jersey number: 30 Enter player 4's rating: 2 Enter player 5's jersey number: 66 Enter player 5's rating: 9 ROSTER Player 1 -- Jersey number: 84, Rating: 7 Player 2 -- Jersey number: 23, Rating: 4 ... (2) Implement a menu of options for a user to modify the roster. Each option is represented by a single character. The program initially outputs the menu, and outputs the menu after a user chooses an option. The program ends when the user chooses the option to Quit. For this step, the other…(Write a code in C++ Programming language)Use a vector to read 10 integer numbers, each of which is between 1 and 50. Begin with an empty vector and use its push_back function to add each unique value to the vector. As each number is read, validate it and store it in the array only if it is not a duplicate of a number already read. After reading all the values, display only the unique values that the user entered.
- Define an integer vector and ask the user to give you values for the vector. because you used a vector, so you don't need to know the size. user should be able to enter a number until he wants(you can use while loop for termination. for example if the user enters any negative number, but until he enters a positive number, your program should read and push it inside of the vector). thenGiven a vector of strings each of length 10. In the vector only one string is present which contains a substring "C++" starting at index 3 in the string. Write a program to print the string that contains "C++" in output. vector<string> vS = {"ABCDE", "PQRSTU", "ZYMPLP", "DFQC++L", "PERTGH"};In PYTHON Write a function that prints multiple times a vector from its first element up to the next occurrence of an element having value equal to a provide number Each print stops at the i-th occurrence of the provided number Use while loop(s) Function Name:vec_multi_print_to_number Parameters:a_vector,a_value Return:none Example: Input:my_vector=[5,6,7,8,9,5,6,7,8,9] Invokefunction:print_up_to_value(my_vector,7) Output:[5,6,7,8,9,5,6,7]
- Declare a vector containing the following items: a) an empty vector containing int elements b) a 30-byte string vectorIn this case, we have an empty vector with items of type Object class Course (created 100 years ago) is still relevant today.Write a program in C++ which asks the user to keep entering positive integers or -1 to quit. Then print how many values they entered, the value of each element they entered, and the average of the values (rounded to two decimal places). Requirements The code must use a vector to store the user data. Do not use a counter variable while asking the user for input. Instead, use the vector method to "push" values onto the vector, then later use the vector size method to determine how many values were pushed. The loop to show the values and calculate the average must use a "for each" loop iterator.In C++ programming Language using Visual Studio(Not Visual Studio Code) Suppose you have a vector of integer data, say { 1, 5, 4, 2, 3 }The data may eventually need to be transformed into some other form, say by sorting the data values for instanceThis would turn the vector into { 1, 2, 3, 4, 5 }Or say I wanted to take the original vector { 1, 5, 4, 2, 3 } and remove all the even numbers from itThis would turn the vector into { 1, 5, 3 }So in general terms, we start with an input vector, and it somehow gets transformed into its transformed vectorThe options really are almost limitless, but we will keep things simple for this checkpoint assignmentWe will be developing a base/derived class relationship that can perform custom transformations of data at runtimeYour submission must follow OOP best practices that incorporates topics in Gaddis' textbook chapters 13 through 15 { 1, 5, 4, 2, 3 } ==========(SORT)==========> { 1, 2, 3, 4, 5 }{ 1, 5, 4, 2, 3 } ======(REMOVE EVENS)======>…
- Define a function named GetWordFrequency that takes a vector of strings and a search word as parameters. Function GetWordFrequency() then returns the number of occurrences of the search word in the vector parameter (case insensitive). Then, write a main program that reads a list of words into a vector, calls function GetWordFrequency() repeatedly, and outputs the words in the vector with their frequencies. The input begins with an integer indicating the number of words that follow. Ex: If the input is: 5 hey Hi Mark hi mark the output is: hey 1 Hi 2 Mark 2 hi 2 mark 2 Hint: Use tolower() to set the first letter of each word to lowercase before comparing. The program must define and use the following function:int GetWordFrequency(vector<string> wordsList, string currWord) write code in c++Define a function named GetWordFrequency that takes a vector of strings and a search word as parameters. Function GetWordFrequency() then returns the number of occurrences of the search word in the vector parameter (case insensitive). Then, write a main program that reads a list of words into a vector, calls function GetWordFrequency() repeatedly, and outputs the words in the vector with their frequencies. The input begins with an integer indicating the number of words that follow. Ex: If the input is: 5 hey Hi Mark hi mark the output is: hey 1 Hi 2 Mark 2 hi 2 mark 2 Hint: Use tolower() to set the first letter of each word to lowercase before comparing. The program must define and use the following function:int GetWordFrequency(vector<string> wordsList, string currWord)Write a similarprogram to compare two vectors. we should make 6 test : same length the first is longer, the second is longer, equal, the first greater , the second greater; try different symbols not only letters