3. Write a program that will input non-negative integer and would display the prime factors of the given integer. Example: Enter non-negative number: 15 Prime factors are: 1 3 5
Q: Implement a class that calculates mathematic expressions. The input passed to this Calculator is in ...
A: Here is Solution for above program : class Calculator: def _init_(self): self._expr=None...
Q: What is Onion network?
A: Here is your Solution .
Q: (1) Prove the identity of each of the following Boolean equations using algebraic manipulation. (a) ...
A: thw answer is an given below :
Q: What is the most significant part of the move from a serial to a batch processing system?
A: Introduction: The most significant feature of the move from serial to batch processing systems.
Q: Given a singly linked list, you need to do two tasks. Swap the first node with the last node. Then c...
A: Since no programming language is mentioned, I am using java. ALgorithm: Start Create a class named ...
Q: set of integers numbers with the multiplication operator forms a field true or false
A: Answer: The given statement is false.
Q: What is the abbreviation for Kilo Bytes Per Second in a computer network?
A: Introduction: The following query is about network speed.
Q: Why will we study any business model, and how will our business solution provide the organisation wi...
A: Introduction: Every day, fresh data sources become available. This may be a good thing for some of u...
Q: The way a card game player arranges his cards as he picks them one by one can be compared to I. Sele...
A:
Q: Abstract: the main purpose of this experiment is build real time system using PPI 8255 to control de...
A:
Q: What are the different sorts of programmes that come with operating systems? Give three to four exam...
A: Following are the sorts of programmes that come with operating systems Batch Operating System Mobil...
Q: Give a DFA accepting all strings over (0,1} consisting of an odd number of repetitions of the string...
A: According to the question we need to answer: Give a DFA accepting all strings over (0,1} consistin...
Q: °Mouses with an optical sensor that can tell when the mouse moves.
A: Introduction: In an optical mouse, the movement of the mouse is detected by an optical sensor.
Q: Java programming Question. Try to find the root mean speed from the velocities of ten particles(in m...
A: Required:- Java programming Question.Try to find the root mean speed fro...
Q: Explain how the internet works, including all equipment involved in the internet connection.
A: WORKING ON THE INTERNET: The internet is described as a computer network that transfers various typ...
Q: 1. Give an analysis of the running time (Big-Oh notation) for each of the following 4 program fragme...
A:
Q: Describe how to send data across a wide area network.
A: Introduction: The communications lines that connect the remote computer systems are usually not owne...
Q: i i need an implementation on the LinkListDriver and the LinkListOrdered for this output : Enter you...
A: Hi i need an implementation on the LinkListDriver and the LinkListOrdered for this output : Enter yo...
Q: Run this program and show the output. Thank you
A: What is Java Swing? Java Swing tutorial is a part of Java Foundation Classes (JFC) that is used to c...
Q: Write a method using haversine formula : haversinecalculator(float lat1, float lon1, float lat2, fl...
A: The Haversine formula calculates the shortest distance between two points on a sphere using their la...
Q: For the following data definition: .data value: .word 15 letters: .byte 'T', 'i', 'm' num: ...
A: Given The answer is given below.
Q: Design a program that asks the user to enter a string • The string will then be displayed back to th...
A:
Q: Why would I want to use a mouse in conjunction with a touch-screen device?
A: Introduction: Touch screens may be found on a wide range of devices, including computer and laptop d...
Q: You have a division with an ID = 'div0'. What JavaScript statement would allow you to change the CSS...
A:
Q: MATLAB I am having trouble creating an array that is filled in with a loop by strictly intialzing a...
A: I give the correct code and now it's working I also provide the output and code screenshot
Q: Suppose a survey study is conducted asking subjects to taste 6 different ice-cream flavors (chocolat...
A: quantity. For example, ice cream flavoursoWith nominal data, all we can do is record the frequency o...
Q: Memory operands must be defined.
A: Introduction: Memory operands can be supplied either by the name of a variable or by a register cont...
Q: Explain the relationship between information gathering and intelligence, including the process where...
A: Here is the answer with an explanation:-
Q: In the process of applying out algorithm for determining distinguishability of states, which of the ...
A: For Getting the optimal solution to this issue we can consider here two algorithms. Prims Algorithm...
Q: The Pinewood Derby involves racing Derby cards down multiple lanes and calculating the average time ...
A: racers=int(input("Enter number of racers: ")) times=[] for i in range(racers): time=int(input("Enter...
Q: 14. Configure hyperlinks in the header area. Use descendant selectors to configure hyperlinks within...
A: Code: <!DOCTYPE html> <html> <head> <style> article header a { ...
Q: Define REN
A: Introduction: REN is an abbreviation for rename command. It is useful for renaming numerous files an...
Q: Make a list of the positives and downsides of using TCP.
A: Your answer is given below.
Q: dentify and fix the errors in the following code: public class Test { public void main (string[] arg...
A: There are some error in code
Q: Library Management Software Application Requirements Document
A: -LSASR is a document that describes a software application that will be used within a library to man...
Q: Use Javascript to create a simple animation where you have 5 equal size images displayed in a repeat...
A: HTML : <h2 class="animation-title">Animation using javascript</h2><img class="eye-ani...
Q: You have the network 192.168.10.0/24. How many subnets and hosts are available? A) 1 subnet with 10...
A: The solution for the above-given question is given below:
Q: Instructions Perform the following items. Upload a photo of your answer sheet showing you solution. ...
A:
Q: What is anti-forensics and how does it work?
A: Introduction: Anti-forensic tactics are content acts intended to obstruct or harden good forensic an...
Q: A superscalar computing system with the 2nd degree of Superscalar and with 3 processing units. The i...
A: Let's see the solution in the next steps
Q: Suppose you are given a task to rank the students. You have gotten the marks and id of the students....
A: NOTE: Code runs successfully as the above problem describe. Please use proper indentation for no err...
Q: What are the applications of Subneting?
A: According to the question the subnet allows to the community to carry out speedy and makes the commu...
Q: Question 4 (b) Create your own queries (10) that would be used by the NATASCO's management team to h...
A: Queries are used for retrieving data from the database.
Q: Describe (with some pseudocode) how to write an ADT that imple ments a priority queue using a binary...
A: Every item has a priority associated with it. An element with high priority is dequeued before an el...
Q: ou are to use the started code provided with QUEUE Container Adapter methods and provide the impleme...
A: //used headesr#include<iostream>#include<string>using namespace std; //queueu structstru...
Q: What type of IPv6 address do you need to get on the Internet? a. Global unicast address b. Anycast ...
A: To get on the internet, you need an address. That address should be unique and be your's only. This ...
Q: What causes source code translation and programme modularization?
A: Introduction: In response to your query, Modular layout is a software design that stresses the split...
Q: You are to use the started code provided with QUEUE Container Adapter methods and provide the implem...
A: Summary: I have implemented the program in c++ as per the requirement and template given in the ques...
Q: 1. Write a program that prints your full name. Write a program that prints your full name using aste...
A: 1.) #include <iostream> using namespace std; int main(){string name;cout<<"Write your na...
Q: What are the other two most significant roles of an operating system, besides process management, do...
A: Let's also know Operating System: An operating system (OS) is system software that manages computer...
C++
Step by step
Solved in 2 steps with 3 images
- Body Mass Index (BMI) is a measure of health on weight. It can be calculated by taking your weight in kilograms and dividing by the square of your height in meters. Write a program which prompts the user to enter the weight in kgs (integer value) and height in feet and inches (both integers) and then calculates the BMI of the person. Your program first need to convert inches to meters (i.e. inches * 0.0254) and then use the following formula to calculate BMI: weight kilogram / (height_meter)^2 Your program displays the BMI value in two decimal places and the corresponding status as shown in the examples below. Note that one inch is 0.0254 meters and 1 foot is 12 inches. For example: Input Result 62 5 10 89 6 0 45 BMI BMI < 18.5 18.5 s BMI < 25.0 25.0 ≤ BMI < 30.0 30.0 ≤ BMI 7 82 5 Interpretation Underweight Normal Overweight Obese 2 Enter weight (kg): Enter height (feet): Enter height (inches): BMI is 19.61, Normal Enter weight (kg): Enter height (feet): Enter height (inches): BMI is…Airline companies apply baggage restrictions for their passengers. An airline company has decided to apply a 10kg limitation for passengers' hand luggage and 20kg for their normal baggage. When passengers arrive, they enter their hand and normal luggage weight from the keyboard. If passengers exceed their normal baggage allowance of 10 dollars per gram, they pay 12 dollars per kg. Accordingly, write the program that calculates the baggage price of the airline they will go to according to the baggage values entered by the arriving passenger and keeps this from closing the program for each passenger. Note: If hand and normal baggage allowances are stretched below the maximum value, the payment amount will be considered not negative. An example printout is given on the right. Geri bildirim gönderGiven the sample code above in generating a random number. Create a program that lets the user play the game of Rock, Paper, Scissors against the computer. The program should work as follows. 1. When the program begins, a random number in the range of 1 through 3 is generated. If the number is 1, then the computer has chosen rock. If the number is 2, then the computer has chosen paper. If the number is 3, then the computer has chosen scissors. (Don't display the computer's choice yet.) 2. The user enters his or her choice of "rock", "paper", or "scissors" at the keyboard. (You can use a menu if you prefer.) 13. The computer's choice is displayed. 4. A winner is selected according to the following rules: a. If one player chooses rock and the other player chooses scissors, then rock wins. (The rock smashes the scissors.) b. If one player chooses scissors and the other player chooses paper, then scissor wins. (Scissors cuts paper.) c. If one player chooses paper and the other player…
- Question # 8: Write a program that inputs a number and checks whether it is a perfect number or not. A perfect number is the number that is numerically equal to the sum of its divisors. For example, 6 is a perfect number because the divisors of 6 are 1, 2, 3 and 1+2+3=61.Blood sugar is considered normal if its rate is less than 140 and greater than 70, it is considered high if its rate is greater than or equal to 140, and it is considered low if its rate is less than or equal to 70. Write a Java program that asks the user to input the rate of blood sugar of each patient in a hospital (-1 to indicate the end of the data.) The program should calculate and print the number of patients with normal blood sugar, number of patients with high blood sugar, number of patients with low blood sugar, and the total number of patients entered by the user.A parking garage charges a $2.00 minimum fee to park for up to three hours and an additional $1 per hour for each hour or part thereof over four hours. The maximum charge for any given 24-hour period is $10.00. Assume that no car parks for longer than 24 hours at a time. Write a program that will calculate and print the parking charges for each of three customers who parked their cars in this garage yesterday. You should enter the hours parked for each customer. Your program should print the results in a neat tabular format, and should calculate and print the total of yesterday's receipts. The program should use the function calculate Charges to determine the charge for each customer.
- Guess-the-number-game: Write a program that pays the game of “guess the number” as follows: Your program choose the number to be guess by selecting an integer at random in the range 1 to 1000. The program then displays the following: I have a number between 1 and 1000. Can you guess my number? Please type your first guess. The player then type a first guess. The program responds with one of the following: 1. Excellent ! you guessed the number! Would like to play again (y or n)? 2. Too low. Try again. 3. Too high. Try again. If the payer’s guess is incorrect, your program should loop until the player finally get the number right. Your program should keep telling the player Too high or Too low to help the player “zero in” on the correct answer.Exercise 4: Write a program that reads two pieces of information: the hourly wages and the number of hours worked by the employee. The program should then calculate the net salary of the employee and display the results as shown in Figure 4. Note that: the net salary of the employee is the sum of the basic wages (which is number of hours worked times the hourly wages) minus the Social Security fees; where the Social Security fees represent 10% of the Basic wages. Name your program Lab3_Id_ex4.py, where Id is your university Id. Include the design of your solution as comments at the beginning of your program. Test your solution with different input data. Please enter the employee hourly wages? 10 please enter the number of hours worked? 40 Basic Salary Hourly Wages Number of Social Net Salary Hours Security **** 10.000 40.00 400.000 40.000 360.000 **** Figure 4: Exercise 4 Sample Run3. Write a program that computes and interprets the Body Mass Index (BMI). The program prompts the user to enter his/her weight in pounds and his/her height in inches. The program then calculates the bmi using the formula: BMI = Weight(kilograms)/(height(meters))?. To convert weight in pounds(p) to kilograms(kg) use the formula: weight(kg) = weight(p) * 0.4536. To convert inches(in) into meters(m) use the formula: height(m) = height(in) * 0.0254. The BMI interpretation is as follows: BMI Interpretation Underweight Normal Overweight Obese BMI 30.0
- 1. Federal law requires that hourly employees be paid “time-and-a-half” for work in excess of 40 hours in a week.For example, if a person’s hourly wage is $12 and he or she works 60 hours in a week, the person’s gross pay shouldbe (40 *12) + (1.5 *12 * (60-40)) = $840.Write a program that requests the floating number of hours a person works in a given week and the person’s hourlywage as input, and then displays the person’s gross pay. Save it as overtimePay.py1. Use if - else - elif Write a program to get an integer input from the user. If the input is 25, get the length and breadth from the user and calculate the area of rectangle. [ Area of rectangle = length * breadth ] If the input is 40, get the side from the user and calculate the area of square. [ Area of square = side * side] If the input is 65, get the radius from the user and calculate the area of circle. [ Area of circle = 3.14"r*r] Otherwise Display Enter number 25 or 40 or 65. 2. Use while loop to print the even numbers from 100 to 50. Print the product of all the even numbers.The first 11 prime integers are 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, and 31. positive integer between 1 and 1000 (inclusive), other than the first 11 prime integers, is prime if it is not divisible by 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, and 31. Write a program that prompts the user to enter a positive integer between 1 and 1000 (inclusive) and that outputs whether the number is prime. If the number is not prime, then output all the numbers, from the list of the first 11 prime integers, which divide the number.