The provided code contains several issues and does not work as intended. It fails to correctly pass parameters by reference and does not call the necessary functions in the correct order.
In the given code, there are multiple problems that prevent it from working correctly. Firstly, the functions 'getJudgeData', 'calcScore', 'findLowest', and 'findHighest' are defined with incorrect parameter types. Instead of passing the parameters by reference, they are being passed by value, which means the modifications made inside these functions won't affect the original variables in 'main'.
To fix this, the functions need to be updated to accept parameters by reference. For example, the signature of the 'getJudgeData' function should be changed to 'void getJudgeData(double& judgeScore1, double& judgeScore2, double& judgeScore3, double& judgeScore4, double& judgeScore5)'.
Additionally, the 'calcScore' function should call 'findLowest' and 'findHighest' to obtain the lowest and highest scores, respectively, before calculating the average score. The corrected code for 'calcScore' would be:
void calcScore(double judgeScore1, double judgeScore2, double judgeScore3, double judgeScore4, double judgeScore5, double& averageScore){
double lowest = findLowest(judgeScore1, judgeScore2, judgeScore3, judgeScore4, judgeScore5);
double highest = findHighest(judgeScore1, judgeScore2, judgeScore3, judgeScore4, judgeScore5);
averageScore = (judgeScore1 + judgeScore2 + judgeScore3 + judgeScore4 + judgeScore5 - lowest - highest) / 3;
cout << "The average score is " << averageScore << endl;
}
In the 'findLowest' and 'findHighest' functions, the logic to find the lowest and highest scores is incorrect. You can use a simple comparison between the current score and the lowest/highest score found so far to determine the correct values. Here's the corrected code for both functions:
double findLowest(double judgeScore1, double judgeScore2, double judgeScore3, double judgeScore4, double judgeScore5){
double lowest = judgeScore1;
lowest = min(lowest, judgeScore2);
lowest = min(lowest, judgeScore3);
lowest = min(lowest, judgeScore4);
lowest = min(lowest, judgeScore5);
return lowest;
}
double findHighest(double judgeScore1, double judgeScore2, double judgeScore3, double judgeScore4, double judgeScore5){
double highest = judgeScore1;
highest = max(highest, judgeScore2);
highest = max(highest, judgeScore3);
highest = max(highest, judgeScore4);
highest = max(highest, judgeScore5);
return highest;
}
By making these corrections, the code should now correctly calculate the average score by dropping the highest and lowest scores, and the necessary parameters will be passed by reference, allowing the modifications to be reflected in 'main'.
Learn more about functions in C++ here:
https://brainly.com/question/29056283
#SPJ11
In this program, the `getJudgeData` function is used to get the score from each judge. It validates the input to ensure it falls within the range of 0 to 10.
```python
# Function to get judge's score
def getJudgeData():
while True:
score = float(input("Enter a judge's score (0-10): "))
if score >= 0 and score <= 10:
return score
else:
print("Invalid score. Please enter a score between 0 and 10.")
# Function to find the lowest score
def findLowest(scores):
return min(scores)
# Function to find the highest score
def findHighest(scores):
return max(scores)
# Function to calculate and display the performer's score
def calcScore():
scores = []
for i in range(5):
score = getJudgeData()
scores.append(score)
lowest = findLowest(scores)
highest = findHighest(scores)
# Calculate the average by removing the lowest and highest scores
total = sum(scores) - lowest - highest
average = total / 3
print("Performer's final score:", average)
# Call the calcScore function to calculate and display the performer's score
calcScore()
```
The `findLowest` and `findHighest` functions are used to find the lowest and highest scores, respectively, from the list of scores passed to them.
The `calcScore` function calls `getJudgeData` to get the scores from all five judges. It then calls `findLowest` and `findHighest` to determine the lowest and highest scores. Finally, it calculates the average by removing the lowest and highest scores and displays the performer's final score.
Input validation is included to ensure that only scores between 0 and 10 are accepte.
Learn more about python here:
https://brainly.com/question/30427047
#SPJ11
What are the steps to add a bibliography to a document? 1. Create a using the proper steps. 2. Go to the tab on the ribbon. 3. In the Citations & Bibliography group, select the Bibliography drop-down menu. 4. Select the correct formatting from the three choices. 5. A bibliography is then added to the
Answer:
The steps required to add a bibliography after adding the sources of the information contained in the document and marking the references made in the text, are;
1. Click to select insertion point of the bibliography
2. Select the Reference tab by clicking on the Reference tab in the ribbon
3. Within the Citations & Bibliography group, select Bibliography to open a dropdown list of bibliography format
4. Select the applicable format
5. By selecting the desired bibliography format, the bibliography is inserted at the selected insertion point of the document
Explanation:
Answer:
1. Create a
✔ citation
using the proper steps.
2. Go to the
✔ References
tab on the ribbon.
3. In the Citations & Bibliography group, select the Bibliography drop-down menu.
4. Select the correct formatting from the three choices.
5. A bibliography is then added to the
✔ bottom of the document
Explanation:
Edg 2021
After pitching her game to a room full of investors, Zoie has confirmed that two of the investors are very interested in learning more. They both called and asked Zoie for a game proposal. What is a game proposal used for?
A.) It is used as the graphical overlay on a game which displays feedback for the player.
B.) It is used to secure funding for the project from venture capitalists or publishers, or with internal teams within the company, taking the concept and ideas about the game and starting to turn them into specifics.
C.) It is the teaser for the game, which is used to sell the game to the team, investors, target audience, or anyone else who might be interested in the game.
D.) It is used to list the different subtasks of a game development project, along with their estimated time and progression.
Answer: B
Explanation:
it is used to secure funding for the project from venture capitalists or publishers, or with internal teams within the company, to take the concept and ideas about the game and start to turn them into specifics
What is the first step to performing hardware maintenance?
Turn off the computer and remove its power source.
The first step to performing hardware maintenance is to gather the necessary tools and equipment, such as screwdrivers, pliers, and anti-static wrist straps. Additionally, it is important to turn off the computer and remove its power source., and follow proper safety procedures to avoid electrical shock or damage to the equipment.
It is important to gather the necessary tools and equipment, power off and unplug the device, and follow proper safety procedures for several reasons:
Safety: Handling electrical components and devices requires caution to prevent electrical shock and other hazards.Prevent damage: Unplugging the device helps prevent damage from accidental power surges while performing maintenance.Ensure proper operation: Following proper maintenance procedures and using the correct tools helps ensure the hardware will continue to operate correctly after maintenance is performed.Avoid further problems: Improperly performing maintenance can sometimes cause more problems than it solves. By preparing beforehand and following proper procedures, the risk of additional issues can be reduced.Here you can learn more about hardware maintenance
https://brainly.com/question/29872500
#SPJ4
What is the most efficient
form of transportation we
have?
Answer:
The bicycle is a tremendously efficient means of transportation. In fact cycling is more efficient than any other method of travel--including walking! The one billion bicycles in the world are a testament to its effectiveness
Explanation:
What prevents someone who randomly picks up your phone from sending money to themselves using a messenger-based payment?
Answer:
Explanation:
There are various safety features in place to prevent such scenarios from happening. For starters phones usually have a pin code, pattern code, or fingerprint scanner which prevents unauthorized individuals from entering into the phone's services. Assuming that these features have been disabled by the phone's owner, payment applications usually require 2FA verification which requires two forms of approval such as email approval and fingerprint scanner in order for any transactions to go through. Therefore, an unauthorized individual would not have access to such features and would not be able to complete any transactions.
The feature which prevents someone who randomly picks up your phone from sending money to themselves using a messenger-based payment is:
Security features like passwords or authentication codesIn a messenger-based payment system, there exists various safety features which prevents unauthorised use of the system to send money fraudulently. Some of these features include:
PasswordsPersonal Identification Number (PIN)Two factor authentication (2FA)As a result of this, we can see that these features prevent someone from making unauthorised money transfers.
Read more here:
https://brainly.com/question/19469131
name two components required for wireless networking
(answer fastly)
Explanation:
User Devices. Users of wireless LANs operate a multitude of devices, such as PCs, laptops, and PDAs. ...
Radio NICs. A major part of a wireless LAN includes a radio NIC that operates within the computer device and provides wireless connectivity.
or routers, repeaters, and access points
5.16 LAB: Output numbers in reverse
Tell me 2-6 computer parts that are inside a computer.
Spam answers will not be accepted.
Answer:
Memory: enables a computer to store, at least temporarily, data and programs.
Mass storage device: allows a computer to permanently retain large amounts of data. Common mass storage devices include solid state drives (SSDs) or disk drives and tape drives.
Input device: usually a keyboard and mouse, the input device is the conduit through which data and instructions enter a computer.
Output device: a display screen, printer, or other device that lets you see what the computer has accomplished.
Central processing unit (CPU): the heart of the computer, this is the component that actually executes instructions.
Explanation:
high-speed cmos transceiver: principles, design and implementation using multi-level (4-pam) signaling pdf
A high-speed CMOS transceiver using multi-level (4-PAM) signaling enables faster data transmission and reception by leveraging the advantages of CMOS technology and multi-level encoding. This technology is used in various high-speed communication systems such as high-speed internet, wireless networks, and optical communication systems.
A high-speed CMOS transceiver is a device that allows for the transmission and reception of digital data at high speeds using complementary metal-oxide-semiconductor (CMOS) technology. The principles behind a high-speed CMOS transceiver involve using multi-level signaling, specifically 4-pulse amplitude modulation (PAM).
In the context of a high-speed CMOS transceiver, multi-level signaling refers to the use of multiple voltage levels to represent digital data. 4-PAM specifically uses four voltage levels to represent four different symbols, which allows for higher data rates compared to binary signaling. Each symbol represents multiple bits of information, increasing the data throughput of the transceiver.
The design and implementation of a high-speed CMOS transceiver using 4-PAM signaling involves various components such as voltage comparators, analog-to-digital converters, digital-to-analog converters, and filters. These components are used to convert the digital data into multi-level signals, transmit them through the communication channel, and then decode them at the receiving end.
To implement a high-speed CMOS transceiver, the design needs to consider factors like signal integrity, power consumption, noise immunity, and synchronization. Advanced modulation and coding schemes can also be used to improve the data transmission reliability and efficiency.
learn more about CMOS transceiver
https://brainly.com/question/33229464
#SPJ11
write both the iterative and recursive fibonacci functions in assembly code. the values are stored in short datatype.
Fibonacci functions in assembly language, both iterative and recursive. In short datatype, the values are kept.
both solution methods
#include<iostream>
using namespace std; /* Fibonacci: recursive version */ int Fibonacci_R(int n) { if(n<=0) return 0; else if(n==1) return 1; else return Fibonacci_R(n-1)+Fibonacci_R(n-2); } // iterative version int Fibonacci_I(int n) { int fib[] = {0,1,1}; for(int i=2; i<=n; i++) { fib[i%3] = fib[(i-1)%3] + fib[(i-2)%3]; cout << "fib(" << i << ") = " << fib[i%3] << endl; } return fib[n%3]; } int main(void) { int a;cout << "a = "; cin>>a;
// calculate the fib(i) from scratch for each i <= a using your recursive function cout << endl << "From recursive function" << endl; for(int i=1; i<=a; ++i) cout << "fib(" << i << ") = " << Fibonacci_R(i) << endl; cout << endl; // or calculate fib(a) once and output the intermediate results from the looping version cout << "From iterative function" << endl; Fibonacci_I(a); cout << endl; return 0; }
complexity O(2^n)
A data type, often known as a type, is a collection of potential values and permitted actions in computer science and computer programming. The data type informs the compiler or interpreter of the programmer's intended use. Integer numbers (of various sizes), floating-point numbers (which resemble real numbers), characters, and Booleans are the fundamental data types that are supported by the majority of computer languages. An expression, such as a variable or function, is limited in what values it can have by its data type. The meaning of the data, the operations that may be performed on it, and the methods for storing items of that type are all defined by the data type.
Learn more about datatype here:
https://brainly.com/question/14213941
#SPJ4
What is the importance of social media to advance social causes
Answer:
Social media can enhance the awareness of a topic. Social media brings helpers towards a social cause.
Explanation:
Considering all sprints shown, how many daily scrums are implied
in the picture below?
Group of answer choices
0
5
15
10
Previous
Considering all the sprints shown in the picture, we can determine the number of daily scrums implied. In each sprint, there are typically one or more daily scrums, also known as daily stand-ups.
To find the number of daily scrums, we need to count the number of sprints shown in the picture. The picture does not show any sprints or indicate any specific number of sprints. Therefore, we cannot determine the exact number of daily scrums implied in the picture.
So,The question is that we cannot determine the number of daily scrums implied in the picture because there are no sprints shown. The question asks about the number of daily scrums implied in the picture Daily scrums are part of the Agile methodology and are held during sprints.
To know more about number visit:
https://brainly.com/question/32400345
#SPJ11
Which are the best examples of cost that should be considered when creating a project budget
Explanation:
how much the project will cost
i like trucks
.....................................
Answer:
Ya so......what's the big deal??
Answer:
yes shawty
Explanation:
I'm trying to level up so I'd appreiciate it if you marked me as brainliest. Thank you!
after writing pseudocode what step is next
The next step would be to implement the pseudocode. This means taking the instructions written in the pseudocode and translating it into a programming language, such as C++, Java, or Python.
What is programming language?A programming language is a special language used to communicate instructions to a computer or other electronic device. It consists of a set of rules and symbols which tell the device what to do . Programming languages are used to create software, websites, mobile applications and more.
This involves taking each step written in the pseudocode and writing code that will perform the same function. Depending on the complexity of the pseudocode, this could involve writing multiple lines of code for each step. After the code is written, it can then be tested and debugged to ensure that it works properly.
To learn more about programming language
https://brainly.com/question/23959041
#SPJ1
what is definition of browser
"A web browser, or simply 'browser,' is an application used to access and view websites.
Explanation:
I hope It'll help you...
Answer:
a computer program with a graphical user interface for displaying and navigating between web pages.
Explanation:
You sit down at your desk to begin working in your online class, and your computer won't turn on. How do you frame your problem into a question so you can solve it? (5 points)
Did my brother break my computer?
How will I get my schoolwork done today?
What is going on?
Why won't my computer turn on?
Answer:
I say number 4 makes more sense
Answer: why won’t my computer turn on
Explanation: I got a 100 trust
which type of technology allows a user to protect sensitive information that is stored in digital files?
a. a photo-editing tool
b. a note-taking app
c. a security tool
d. a videoconferencing app
The technology that allows a user to protect sensitive information stored in digital files is option c) a security tool.
To protect sensitive information stored in digital files, a security tool is the appropriate technology to use. Security tools are specifically designed to safeguard data and prevent unauthorized access. They employ various mechanisms to ensure the confidentiality and integrity of the information.
a) A photo-editing tool is primarily used for manipulating and enhancing images, not for protecting sensitive information in digital files.
b) A note-taking app is designed for capturing and organizing text-based notes, but it does not provide robust security features for protecting sensitive information stored in digital files.
d) A videoconferencing app is used for conducting virtual meetings and video calls. While it may have certain security measures in place, its primary purpose is not to protect sensitive information stored in digital files.
In conclusion, option c) a security tool is the most suitable technology for protecting sensitive information in digital files due to its dedicated features and functionalities aimed at ensuring data security.
For more such questions on security tool, click on:
https://brainly.com/question/25670089
#SPJ8
Why are Quick Parts useful in an Outlook message?
Spreadsheet data sources can be hyperlinked to an email message.
Stored text and graphics can be quickly inserted into an email message.
A gallery of shapes will open up, and you can quickly choose one to insert.
Highlighted parts of Word documents can be inserted into a message body.
Answer:
I hope the picture helped
Answer:
B. stored text and graphics can be quickly inserted into an email message
Explanation:
Edge 2021
a user complains that recently every printed document has vertical lines and streaks on the paper. what should the technician do to resolve the issue?
The technician should first check and clean the printer's printhead to resolve the issue. This can be done by accessing the printer's maintenance menu and selecting the option to clean the printhead. If the problem persists, the technician may need to replace the printhead or perform further troubleshooting.
Vertical lines and streaks on printed documents are often caused by issues with the printhead. The printhead is responsible for depositing ink or toner onto the paper, and if it becomes dirty or clogged, it can result in poor print quality.
To resolve the issue, the technician should begin by accessing the printer's maintenance menu. The exact steps may vary depending on the printer model, but typically there will be an option to clean the printhead. Running a printhead cleaning cycle will help remove any built-up ink or debris that may be causing the lines and streaks.
After performing the printhead cleaning, it is important to test print a document to see if the issue has been resolved. If the problem persists, the technician may need to consider other potential causes, such as a faulty or worn-out printhead. In such cases, it may be necessary to replace the printhead or perform additional troubleshooting steps, such as checking for any software or driver updates, or examining the printer for any physical defects that could be affecting the print quality.
To know more about printhead cleaning click here,
https://brainly.com/question/31578329
#SPJ11
lexie works for a small insurance agency managing their it network. she's setting up some new file storage space and needs to provide backup coverage as well as remote access to the data. which storage type is the best solution for lexie's purposes? a. nas b. raid c. san d. ram
The storage type is the best solution for Lexie's purposes is SAN. The correct option is c.
What is storage?Memory is the location of short-term data, whereas storage is the component of your computer that allows you to store and access data over time.
A storage area network (SAN) is a network of storage devices that can be accessed by numerous servers or computers, allowing for a shared pool of storage capacity. Each computer on the network can access SAN storage as if it were a local disc linked directly to the computer.
Therefore, the correct option is c. san.
To learn more about storage, refer to the link:
https://brainly.com/question/20116592
#SPJ1
A small company is deciding which service to use for an enrollment system for their online training website. Choices are MySQL on Amazon Elastic Compute Cloud (Amazon EC2), MySQL in Amazon Relational Database Service (Amazon RDS), and Amazon DynamoDB. Which combination of use cases suggests using Amazon RDS? (Select THREE. ) Data and transactions must be encrypted to protect personal information. The data is highly structured Student, course, and registration data are stored in many different tables. The enrollment system must be highly available. The company doesn't want to manage database patches.
The combination of use cases that suggests using Amazon RDS for the enrollment system are: the need for data and transaction encryption, the presence of highly structured data stored in multiple tables, and the requirement for a highly available system without the need for managing database patches.
Data and transaction encryption: Amazon RDS provides built-in encryption capabilities to protect personal information. This is important for ensuring data security and compliance with privacy regulations, making it suitable for scenarios where sensitive information needs to be safeguarded.
Highly structured data stored in multiple tables: Amazon RDS supports a variety of relational database engines, including MySQL. With its ability to handle complex and structured data models, Amazon RDS is well-suited for scenarios where student, course, and registration data are stored in different tables, allowing for efficient querying and data management.
High availability and patch management: Amazon RDS offers automated backups, replication, and failover capabilities, ensuring high availability for the enrollment system. It also takes care of routine database administration tasks, including patch management. This relieves the company from the burden of managing and maintaining the database infrastructure, allowing them to focus on their core business operations.
By considering these factors, such as the need for encryption, structured data storage, high availability, and simplified database management, the company can make an informed decision to use Amazon RDS for their enrollment system on their online training website.
Learn more about encryption here: https://brainly.com/question/28283722
#SPJ11
describe how the java collections framework facilitates the design, implementation, testing, and debugging of large computer programs
The Java Collections Framework provides a suite of tools for testing and debugging code that uses collections. These tools include debugging tools, profiling tools, and testing frameworks. These tools help developers to identify and fix bugs in their code quickly and efficiently, which is critical when working with large computer programs.
The Java Collections Framework facilitates the design, implementation, testing, and debugging of large computer programs. This framework provides several classes and interfaces for representing collections of objects, such as lists, sets, and maps. These classes and interfaces are implemented in a generic way, which allows for easy integration into large computer programs. The generic implementation of these classes and interfaces allows developers to reuse code and minimize the amount of custom code required for implementing collections. Additionally, the Java Collections Framework provides a rich set of algorithms for working with collections, such as searching, sorting, and filtering. These algorithms are optimized for performance and can handle collections of any size. This helps developers to write efficient and reliable code that can scale to handle large datasets.
Learn more about computer programs here:
https://brainly.com/question/14436354
#SPJ11
How can computers store pictuers when they only use numbers?
Differentiate between the terms endogamy and exogamy?
Endogamy and exogamy are terms used in anthropology and sociology to describe the practices of marriage and family formation within a society or group. Both terms refer to the social norms that govern whom an individual is allowed or encouraged to marry.
Endogamy refers to the practice of marrying within one's own social, cultural, or ethnic group. This means that individuals are encouraged or required to marry someone from the same social background, religion, or ethnicity as themselves. Endogamy can be enforced through formal rules, such as religious laws, or through informal social pressure. Exogamy, on the other hand, refers to the practice of marrying outside of one's own social, cultural, or ethnic group. In many societies, exogamy is encouraged or even required in order to strengthen ties between different groups. Exogamy can also be enforced through formal rules, such as laws against incest, or through informal social pressure. In summary, endogamy and exogamy are two terms used to describe the practices of marriage and family formation within a society or group. Endogamy refers to the practice of marrying within one's own social, cultural, or ethnic group, while exogamy refers to the practice of marrying outside of one's own group. Both practices are shaped by social norms and can be enforced through formal rules or informal social pressure.
To learn more about Endogamy, visit:
https://brainly.com/question/29440894
#SPJ11
Allocation is the portion of a resource's capacity devoted to work on a task. Every resource is said to be in one of 3 states of allocation, which are:
OA. Under allocated, Totally allocated or Over allocated
OB. Not allocated, Fully allocated or Over allocated
OC. Under allocated, Fully allocated or Super allocated
D. Under allocated, Fully allocated or Over allocated
Answer:
D. Under allocated, Fully allocated or Over allocated
Explanation:
Resource allocation is the process of assigning a portion of a resource's capacity to a certain task. A resource can be in one of three states of allocation: under allocated, fully allocated, and over allocated.
When a resource is under allocated, it means that not enough of its capacity has been devoted to the task. When a resource is fully allocated, it means that its capacity is completely devoted to the task. And when a resource is over allocated, it means that more of its capacity has been devoted to the task than it is actually able to handle.
Answer:
D. Under allocated, Fully allocated or Over allocated.
Explanation:
Under allocated: A resource is considered under allocated when it is not assigned enough work to utilize its full capacity, i.e., its capacity is not fully utilized.Fully allocated: A resource is considered fully allocated when it is assigned just the right amount of work to utilize its full capacity, i.e., its capacity is fully utilized.Over allocated: A resource is considered over allocated when it is assigned more work than its capacity, i.e., it is assigned more work than it can handle in the given time frame.These states of allocation are important in project management to ensure that resources are optimally utilize
a virtual function is declared by placing the keyword ________ in front of the return type in the base class's function declaration.
The keyword "virtual" is placed in front of the return type in the base class's function declaration to declare a virtual function.
Here is an example of how a virtual function is declared in a base class:
```cpp
class Base {
public:
virtual void myFunction(); // Virtual function declaration
};
```
In the above example, the function `myFunction()` is declared as a virtual function in the base class `Base`. The keyword "virtual" is used before the return type (`void` in this case) to indicate that this function can be overridden by derived classes.
By declaring a function as virtual in the base class, you enable polymorphic behavior, allowing derived classes to provide their own implementation of the function. This enables dynamic dispatch at runtime, where the appropriate derived class's implementation of the virtual function is called based on the actual object's type.
Note that the derived class should also declare the function with the "virtual" keyword if it intends to override the virtual function.
Learn more about virtual function here:
https://brainly.com/question/12996492
#SPJ11
Vivian and other members of her group are attending an event where they have to give short, uninterrupted speeches, one after the other. The moderator has a passive role during the course of the discussion, he or she has to simply introduce the presenters and manage the time frame of the event. At the end of the discussion, the moderator engages with the presenters and audience to ask questions and point to areas of agreement or disagreement.
Vivian is part of a _____.
Answer:
Panel discussion at a symposium
Explanation:
A symposium is a discussion held in public and arranged so that groups of experts in a particular field of study can come together and present information, papers, discoveries, and new researches and also to provide recommendations as to what is and not to be done
A moderator for the symposium and the panel members usually seat in front of an audience to whom a prepared brief report is presented by the panel group members after which the key point may be summarized by the moderator and the audience can take part in asking questions which are answered by the panel members
Therefore;
Vivian is part of a panel discussion at a symposium
write sql commands to the following:-
1. display the average price of each type of vehicle having quantity more that 20.
2. count the type of vehicle manufactured by each company
3. display the total price of all the types of vehicles
plssss answerrr...
Answer:
I can't seem to add SQL to the answer, so let's try this:
For the first one, you need to build a select that uses the avg function on the price column.
For the second one, you need to use the count function. Select that and the company, and group by company.
For the third, it's slightly unclear. Do they mean to mean to display the total price of all vehicles or the total price of each type of vehicle. The former would just be done by selecting a sum of the price. The latter by selecting that and the type column, grouping by type. I'm not sure if type is a keyword, so you might need backtick quotes wrapped around it.
See below for the SQL command of each category
How to write the SQL commands?To do this, we make use of the following clauses:
SELECTAVERAGEWHERECOUNTUsing the above highlight, we have:
Average price of each vehicle having quantity more than 20.The table name is given as: Vehicles
To display the average, we use the following query:
SELECT
Type, avg(Price)
FROM Vehicle
GROUP BY Type
HAVING QTY >20;
Count type of vehicle by each companyTo count each type of vehicle, we use the following query:
SELECT
company, COUNT(DISINCT Type)
FROM VEHICLE
GROUP BY Company;
Display the total price of allThe total price is calculated using:
Total = Price * Quantity
So, we have the following query:
SELECT
Type, SUM(Price* Qty)
FROM VEHICLE
GROUP BY Type;
Read more about SQL at:
https://brainly.com/question/25694408
#SPJ2
why does computer uses 0s and 1s to procress data
Answer:
Computers use binary - the digits 0 and 1 - to store data. The circuits in a computer's processor are made up of billions of transistors . A transistor is a tiny switch that is activated by the electronic signals it receives. The digits 1 and 0 used in binary reflect the on and off states of a transistor.