Design a program that will ask the user to enter the amount of a purchase. The program should then compute the state and country sales tax. Assume the state sales tax is 4 percent and the country sales tax is 2 percent. The program should display the amount of the purchase, the state sales tax, the country sales tax,
Q: Explain the perceptron algorithm.
A: Answer The perception algorithm is a two- class (binary) classification machine learning algorithm....
Q: a) A local shop sells festival cookies at RM28.50 per box. The shop offers special discount for orde...
A: As per the requirement program is written. Algorithm: Step 1: Write the main() method Step 2: Print ...
Q: What distinguishes social engineering from other types of attacks?
A: Introduction: The skill of obtaining sensitive information from individuals is known as social engin...
Q: What are the advantages of having a working understanding of computers and technology? The adva...
A: Intro The question is about the advantages of having a working understanding of computers and techn...
Q: m do not have
A: 2 types of items, 1 is on which tax can be implemented and on other it cant. So what we need is a so...
Q: VLANs are configured on what type of networking equipment?
A: VLANs It stands for virtual local area networks. They are the network devices which allows network ...
Q: There are three groups of people, people who like Apples, Bananas, and Cherries. 19 people like Appl...
A: Given :- 1.There are three groups of people, people who like Apples, Bananas, and Cherries. 19 peopl...
Q: What are the advantages of utilizing DRAM as the primary memory storage device?
A: Introduction: Dynamic random-access memory (dynamic RAM or DRAM) is a type of random-access semicond...
Q: create assignments for algorithms with given running time: O(n^2)
A: Given running time is O(n^2) The runtime can be of this only if we use nested loop where each has n ...
Q: Draw the circuit that corresponds to the following Boolean expression: (P ∧ Q) ...
A: Circuit is given below :
Q: What is the purpose of having so many different addressing modes?
A: Answer 8022-5-17RETC AID: 27341 12/08/2013 RID: 76 | 20/09/2013 Addressing Modes The addressing mode...
Q: #include #include using namespace std; 5 int main() { int num, sum=0; cout > num; 10 11 cout <<" the...
A: Lets assume n = 173 So sum will be 11 lets dry run your code
Q: (Information technology and computer networking) Explain the similarities and differences between th...
A: Introduction: Is there a distinction between ICMP and ICMPv6? The Internet Control Message Protocol ...
Q: 16.3 What difference does the order of the two numbers a and b make when we calculate their greatest...
A: Greatest common divisor using the euclidean algorithm a and b are the two numbers.
Q: Write Java program that randomly generate two Integers between 1 and 10 as input and perform an oper...
A: As per the requirement program is completed. Algorithm: Step 1: Write the main() method Step 2: Gene...
Q: Please write it in Python Write a delete function that takes as an argument a list l and an elem e...
A: Python Code: def delete( l, x ): l.remove(x) return x Explaination : Define a function de...
Q: Can you help me here ! I get this wrong in my PHP code when I open it in localhost. Fatal e...
A: It means you can't connect to a server. Check your connection to a valid Internet address and your f...
Q: Write C++ code to get the following output using stack data structures and using Stack Functions 1- ...
A: #include <iostream> #include<stack> using namespace std; int main() { //create s...
Q: Design using arduino in tinkercad Barcode circuit with LCD display
A: The code window will show the "blocks" manager naturally. I transformed it to message simply by tapp...
Q: Library Management Software Application will be implemented Draw the classes in the system and the r...
A: To elaborate on its principles, the Class Diagram for Library Management System is provided with an ...
Q: 1-Write an application using a hash table that finds all the pairs of two integers within the below ...
A: According to our company policy we can answer one question at a time. If want to know the answer of ...
Q: Discuss the advantages and disadvantages of paging
A: In Step 2, I have provided advantages and disadvantages of paging----------
Q: What would be the programming restrictions if we didn't have control structures?
A: Introduction: Control structures are the primary decision-making element of a programming language; ...
Q: Explain how the set-associative cache concept combines the concepts of direct cache and fully associ...
A: Introduction: The set-associative cache is a compromise between entirely associative cache and direc...
Q: Write a Python program that computes common factors of two natural numbers ? and ?. The program also...
A: Python Program: # Taking two numbers from usernum1 = int(input("Enter first number: "))num2 = int(in...
Q: When layering group functions, what is the greatest depth allowed?
A: Deep learning is a machine learning and artificial intelligence (AI) approach that simulates how hum...
Q: Which VLAN on a switch is responsible for managing untagged frames?
A: INTRODUCTION: It is possible to create a virtual local area network (VLAN) to link devices that are ...
Q: Networks that use packet switching: a) Are very sluggish, frequently taking up to 24 hours to rel...
A: Introduction Packet switching network: Packet switching is a process by which information is first d...
Q: Why does HTTP, FTP, SMTP, and POP3 use TCP instead than UDP?
A: Introduction: TCP offers dependable data transport from one host to another, HTTP, FTP, SMTP, and P...
Q: Prove that in each component of the context of any graph, the number of vertices of an odd degree is...
A: INTRODUCTION: We need to prove the number of vertices of an odd degree is always even.
Q: PARTS file with Part# as the hash key (K) includes records with the following Part# values:2360, 376...
A: Hash Function cell numbers slots or Storage Buckets with part # values Hash(Part #) producing the fo...
Q: Give two examples of the idea of caching that are not related to computers.
A: Introduction: Cache has a limited capacity for temporarily storing data.Supplies may be used in ever...
Q: What is the reason that different operating systems install disk folders in different track location...
A: Introduction: Directories on the hard drive: Data on logical files are translated into physical sect...
Q: i) Write a JAVA program to input the elements of an integer array of size 10 and then print the sum ...
A: Answer
Q: You are going to write a MIPS program that does the following (there is C++ sample code below to exp...
A: Actually, program is an executable software that runs on a computer.
Q: A sphere with radius rr is inscribed perfectly tightly into a cube. Write a python program that comp...
A: Python: Volume of a Sphere A circle is a three-layered strong with no face, no edge, no base and no ...
Q: . 2) You are required to write an Assembly Language program segment to perform the operation Ci = w...
A: Given 2. 2) You are required to write an Assembly Language program segment to perform theoperati...
Q: A user interface can be extremely constraining in its functionality. For example, the interface desi...
A: Introduction: When used in conjunction with an operating system or GUI (graphical user interface), t...
Q: Question 1: Reconstruct the excel files for the two-phase signal optimization problems. Solve the tw...
A:
Q: . Show the sequence of commands needed to load the machine co 320E3412H starting at address CS:100, ...
A:
Q: write a program that takes a temperature reading in Fahrenheit and outputs the equivalent measuremen...
A: Code : Following function converts the Fahrenheit temperature to celsius: def fToc(fah): #formula ...
Q: should be selected using a file dialog box -- the name should not be passed to readVehicleData() as ...
A: Given The name of the file that you read from should be selected using a file dialog box -- the name...
Q: Identifying Network Exploitation Malicious Services: explains the first service running, if it w...
A: A denial-of-service (DoS) assault happens when a hostile cyber threat actor prevents legitimate user...
Q: Write a program that prompts the user to enter the month and year and displays the number of days in...
A: Introduction: Here we are required to make a C++ program that hat prompts the user to enter the mont...
Q: 2. SALES TAX Design a program that will ask the user to enter the amount of a purchase. The program ...
A: Since no programming language is mentioned, I am using python. Algorithm: Start Read amount of purc...
Q: Model-driven engineering ? Select one: a. Uses only model/diagram to document the requirements b. T...
A: Explanation : in model driven engineering the software development takes place by by analysing , exp...
Q: Vrite a code to add two numbers stored in physical addresses 18638H and 15688H respe direct addressi...
A: Lets see the solution.
Q: You can make a class abstract by declaring it with keyword abstract. An abstract class normally cont...
A: An abstract class is a class which can have 0 or more abstract methods An abstract class is declared...
Q: Explain cloud computing, IoT, and the wireless revolution.
A: Cloud Computing and IoT are both connected to each other with the Internet so let's talk about Inter...
Q: Write a python program that generates all the permutations of an ordered set that that do not have i...
A: Algorithm: Start Import permutations for itertools Initialize a list s with [1,2,3,4,5] Using permu...
Max Function
Statistical function is of many categories. One of them is a MAX function. The MAX function returns the largest value from the list of arguments passed to it. MAX function always ignores the empty cells when performing the calculation.
Power Function
A power function is a type of single-term function. Its definition states that it is a variable containing a base value raised to a constant value acting as an exponent. This variable may also have a coefficient. For instance, the area of a circle can be given as:
Java langauge, thank you
Step by step
Solved in 4 steps with 2 images
- (Science: calculating energy) Write a program that calculates the energy needed to heat water from an initial temperature to a final temperature. Your program should prompt the user to enter the amount of water in kilograms and the initial and final temperatures of the water. The formula to compute the energy is Q = M * (finalTemperature – initialTemperature) * 4184 where M is the weight of water in kilograms, temperatures are in degrees Celsius, and energy Q is measured in joules.Time CalculatorWrite a program that asks the user to enter a number of seconds.-There are 60 seconds in a minute. If the number of seconds entered by the user is greater than or equal to 60, the program should display the number of minutes and leftover seconds in that many seconds.-There are 3,600 seconds in an hour. If the number of seconds entered by the user is greater than or equal to 3,600, the program should display the number of hours, minutes, and leftover seconds in that many seconds.-There are 86,400 seconds in a day. If the number of seconds entered by the user is greater than or equal to 86,400, the program should display the number of days, hours, minutes, and leftover seconds in that many seconds.Coin Converter Lab Description Write a program that asks the user to enter an amount of money in the format of dollars and remaining cents. The program should calculate and print the minimum number of coins (quarters, dimes, nickels and pennies) that are equivalent to the given amount.Hint: In order to find the minimum number of coins, first find the maximum number of quarters that fit in the given amount of money, then find the maximum number of dimes that fit in the remaining amount, and so on. File Name coins.py Score There are five tests each worth 2 points For example, an execution should look like this:Please enter the amount of money to convert:# of dollars: 2# of cents: 37The coins are 9 quarters, 1 dimes, 0 nickels and 2 pennies python labs
- (Geometry: great circle distance) The great circle distance is the distance between two points on the surface of a sphere. Let (x1, y1) and (x2, y2) be the geographi- cal latitude and longitude of two points. The great circle distance between the two points can be computed using the following formula: d = radius * arccos(sin(x1) * sin(x2) + cos(x1) * cos(x2) * cos(y1 - y2)) Write a program that prompts the user to enter the latitude and longitude of two points on the earth in degrees and displays its great circle distance. The average earth radius is 6,378.1 km. The latitude and longitude degrees in the formula are for north and west. Use negative to indicate south and east degrees.(Financial application: calculate future investment value) Write a program**(PYTHON)** that reads in an investment amount, the annual interest rate, and the number of years, and displays the future investment value using the following formula: futureInvestmentValue = investmentAmount * (1 + monthlyInterestRate)^numberOfMonths For example, if you enter the amount 1000, an annual interest rate of 4.25%, and the number of years as 1, the future investment value is 1043.33. Here is a sample run: Enter investment amount: 1000 Enter annual interest rate: 4.25 Enter number of years: 1 Accumulated value is 1043.33Car sales commission problem - For each used car a salesperson sells, the commission paid is as follows: $20 plus 30% of the selling price in excess of the cost of the car. Typically, the minimum selling price of the car is the cost of the car plus $200 and the maximum selling price is the cost of the car and $2,000. Write a program that prompts the user to enter the salesperson’s fixed commission, the percentage of the commission, the purchasing cost of the car, the minimum and the maximum amount to be added to the purchasing cost to determine the minimum and the maximum selling price, and outputs minimum and maximum selling price of the car and the salesperson's commission range. As a suggestion, pay particular attention to the formulas would your being requested. I would recommend that you perform the calculations on paper or in Excel prior to programming the solution. Paint usage calculator -A room has one door, two windows, and a built-in bookshelf and it needs to be painted.…
- The following code intends to input a user’s first name, last name, and age.However, it has an error. Fix the code.string fullName;int age;cout << "Enter your first and last name." << endl;cin >> fullName;cout << "Enter your age." << endl;cin >> age;cout << "You are " << age << " years old, " << fullName << endl;circles) Write a program that prompts the user to enter the center coordinates and radii of two circles and determines whether the second circle is inside the first or overlaps with the first, as shown in Figure 4.11. (Hint: circle2 is inside circle1 if the distance between the two centers <= | r1 - r2| and circle2 overlaps circle1 if the distance between the two centers <= r1 + r2.Q4: (Find the two lowest scores) Write a program that prompts the user to enter the number of students and each student’s name and score, and finally displays the student with the lowest score and the student with the second-lowest score.
- Widgets and Gizmos An online retailer sells two products: widgets and gizmos. Each widget weighs 75 grams. Each gizmo weighs 112 grams. Write a program that reads the number of widgets and the number of gizmos in an order from the user. Then your program should compute and display the total weight of the order.A movie in a local theater is in great demand. To help a local charity, the theater owner has decided to donate a portion of the gross amount generated from the movie to the charity. This example designs and implements a program that prompts the user to input the movie name, adult ticket price, child ticket price, number of adult tickets sold, number of child tickets sold, and percentage of the gross amount to be donated to the charity. The output of the program is as follows: ** The input to the program consists of the movie name, adult ticket price, child ticket price, number of adult tickets sold, number of child tickets sold and percentage of the gross amount to be donated to the charity. Sample Input: Enter the movie name : Darna Enter the price of an adult ticket: 4.50 Enter the price of a child ticket : 3.00 Enter the number of adult tickets sold : 800 Enter the number of child tickets sold : 1850 Enter the percentage of donation : 10 Sample Output: Movie Name : Darna Number…Guess The Number Game: write a program that will ask the user to guess a secret numberrandomly generated by your program between 1-10. Player have 3 trials to guess the number.After each trial, you have to inform the user, either he/she has guessed it correctly or not, andthe remaining trials to guess the number. In each trial your program should generate a newrandom number. If user guess at least twice correctly, then shows the message, “you won by 2-1” and vice versa for losing.When game is over, ask the user to play again: If the user types "yes", the game start again.else stop the game.