The formula below decribes Newton's second law of motion Force = Mass x acceleration Using the variables below Write one line of code that will calculate the acceleration of a object. // Mass in Kg float mass = 50.3; // Froce in N int force = 720; //acceleration float accel;
Q: What does the following code display: int value = 41; System.out.printın ( "Incrementing value: " +…
A: Here, we have given the java code. We need to complete the whole code in order to extract the output…
Q: In Python, how do I change my code to display the correct way. The salaries should be floating…
A: employee_names=[]employees_salaries=[] while True: employee_name=input("Enter employee name: ")…
Q: just need to tell what the code is doing as no 1 is done Briefly comment each of the following…
A: The ask is to explain the given snippet of code.
Q: This is also a continuation from the previous two questions. The first two questions was for 1 and 2…
A: Please find the answer below :
Q: use visual basic Depreciation to a Salvage Value of 0 . For tax purposes an item may be depreciated…
A: Design
Q: Write a program that declares a constant named QUARTS_IN_GALLON which holds the number of quarts in…
A: Program: //definition of main class public class Main { //declare the constant variable with a…
Q: 41 In the code below, how many print statements will run? 1 age = 13 2 if age = 13: %3D%3D 3 print…
A: Here in this question we have given python code segment and we have asked that how many times print…
Q: The formula below decribes Newton's second law of motion Force = Mass x acceleration Using the…
A: PROGRAM INTRODUCTION: Include the required header files. Declare the required variables. Initialize…
Q: 2. Write an application that reads the (x,y) coordinates for two points. This should prompt for and…
A: Ans: Code: import java.util.Scanner;class Main{ public static void main(String arg[]) {…
Q: “Fix” the following 3 lines of code so that the print the last line of code correctly: age…
A: EXPLANATION: In the first line, there should be “=” to assign the value and to get the int type…
Q: Test the following program for different values and identify the error. int main() { double…
A: I have given an answer in step 2.
Q: You will calculate the gross pay for an individual using the formula gross pay = rate * hours You…
A: System.out.println("Enter Health Insurance tax withholding rate:"); double healthtax =…
Q: Create a program that determines how quickly an object is travelling when it hits the ground (we'll…
A: Program: import math#print final velocity calculatorprint("Final velocity calculator")#print to ask…
Q: Write a program that declares a named constant to hold the number of quarts in a gallon (4). Also…
A: Actually, the code has given below:
Q: Three-letter acronyms are common in the business world. For example, in Java you use the IDE…
A: import java.util.*; public class ThreeLetterAcronym{ public static void main(String[] args) {…
Q: Three-letter acronyms are common in the business world. For example, in Java you use the IDE…
A: Program description : The java program, ThreeLetterAcronym.java prompts users to enter three words…
Q: Write an application that initialize the radius of a circle as an integer and prints the circle’s…
A: PROGRAM CODE: import java.util.*; // import the utility package public class Main{…
Q: JAVA Given an airplane’s acceleration a and take-off speed v, you can compute the minimum runway…
A: Here, Code instruction is given.
Q: Write an application that allows a user to enter any number of student quiz scores, as integers,…
A: PROGRAM CODE: import java.util.Scanner; public class Main { public static void main(String[]…
Q: The formula below decribes how to convert a temperature on the Fahrenheit scale to a temperature on…
A: I have written this program in c language Alogrithm: 1.Declare float variable TempK and TempF…
Q: Assume there is a variable, h that has already been assigned a positive integer value. Write the…
A: In step 2, you will get python code. In step 3, you can see the sample output.
Q: Gino's Pizzaria wants an application to compute the price of pizza orders, based on the following:…
A: Actually, the given information is: If the size/toppings are:�small� with 2 or fewer toppings,…
Q: YOU HAVE TWO TAKE TWO INTS, EACH IN THE RANGE 10.99, PRINT 'POSSIBLE' IF THERE IS A DIGIT THAT…
A: Required:- You have two take two ints, each in the range 10..99, print 'Possible' if there is a…
Q: 3. Write a program that computes and interprets the Body Mass Index (BMI). The program prompts the…
A: Take two inputs from user for height and weight convert height in meter(h*0.0254) and weight in…
Q: #include stars in the form of void main(){ int i,j; for (i=0;i0;j-{ if(j>5+i| lj<5-i) cout<<" ";…
A: For i =0 and j =10 the if condition becomes true that is 10 >5 hence the print statement will…
Q: Complete the following program skeleton so it displays the volume of a cylindrical fuel tank. The…
A: Complete Source code for the program #include <iostream>#include<cmath> using namespace…
Q: Implement the following: Given: food1 = "Salad" food2 = "Sandwich" price1 = 3.6 price2 = 4.99 Print…
A: food1 = "Salad"food2 = "Sandwich"price1 = 3.6price2 = 4.99 print("Lunch:", food1, f"{'' : <25}",…
Q: int calculatepower (int x, int y) { if (y > 0) return x* else return 1; int main () { int num, pwr;…
A: Given:code reads two numbers from user : num, pwrand tries to print num to the pwr : num^pwrby…
Q: Write a program that declares a variable that represents minutes worked on job and assign a value.…
A: Variable: The value which is stored in particular location is called as variable
Q: Write a full program that display the area of a rectangle. The program calls the following two…
A:
Q: You have to cast the variable into different data types as follows: • Cast a as float to a variable…
A: There are different types of casting here we are using implicit type casting Implicit type casting…
Q: Welcomes the user to the Travel Time Calculator. Asks user for number of miles traveled(allow user…
A: print("Welcome to the trip time calculator") d=float(input("\nEnter the miles travelled :"))…
Q: The following variables have been initialized for you: int a; float f; double d; You have to…
A: Below program does casting of variables for different data types It declare variables a, d and f…
Q: The following declaration, program, and program segment has errors. Locate as many as you can.…
A: One may want to set a default value for the property member, and therefore when not started would…
Q: The last part of this code I need the "cans" to be a whole number. I don't know how to change it…
A: We have a program in C++ language and we have an output where Cans needed value is float and we need…
Q: int numl, num2, num3; double length, width, height; double volume; numl = 6; num2 = 7; num3 = 4; %3D…
A: a. Given statement: volume =box(length, width, height); Here, "box" is the method which is passed…
Q: Write an application that allows a user to enter any number of student quiz scores, as integers,…
A: In this question, we asked to write an application in java to do some operations for valid scores…
Q: Comment these two codes def volumeFormula(radius, høyde): PI = 3.14 Volume = PI *…
A: Part1: # A function to find volume of cylinderdef volumeFormula(radius, høyde): PI = 3.14 #…
Q: Write an application that computes a business's potential profits each year for 20 years using the…
A: Source Program: //header files #include<iostream> #include<conio.h> //main body int…
Q: main.c 1. Leap Year Detector 1 #include by CodeChum Admin 2 3 int isleapYear(int); Let's try to find…
A: Your Code is here with an output .
Q: Evaluate the following expressions, assume the following declarations: int x = 4; int y = 1/2; int…
A: Given x=4 As y is int it takes 1/2=0.5 It take only 0 as it is int. y=0 num=6 num*=x + y num=num * x…
Q: This is a Computer Science Question and I need to figure out how write a program that will solve…
A: Program Approach-Define a class named Population.Declare and initialize all the variables.As there…
Q: Assume that there is no data-type float or double in the Cimplementation on your computer. You…
A: ALGORITHM:- 1. Use character array to take input for the numbers. 2. Use strcmp to compare their…
Q: int my_num = 100.0; b- int Smy_num = '10000'; c- int myNum = 1000; d- int my num = 100000; a- 1)…
A: One is a valid variable declaration
Q: 1# Write a program that allows users to choose from one of three shapes: Squares, Circles or (right)…
A: As programming language is not mentioned so we are solving this in C++
Q: Create a program called "Geometry" Prompt the user for a small decimal number. Prompt the user for…
A: Input : Lower and the upper bound float from the user Output : Random number generated from in…
Q: int a = 5, b = 12; double x = 3.4, z = 9.1; What are the values of the following expressions? A) b/…
A: Here is the program which execute these statements #include<iostream>using namespace std;int…
Q: Declare an integer variable named ones and initialize it to the value in the ones position from…
A: In a number, the position of each digit is identified by its place value. For example, if number,…
Q: Write an application that asks a user to enter an integer. Display a statement that indicates…
A: The code should start with asking the user to enter the integer followed by an if else loop that…
The formula below decribes Newton's second law of motion
Force = Mass x acceleration
Using the variables below Write one line of code that will calculate the acceleration of a object.
// Mass in Kg
float mass = 50.3;
// Froce in N
int force = 720;
//acceleration
float accel;
//One line of code to calculate temperature in Kelvin the acceleration of a object
Step by step
Solved in 2 steps
- Write a program named MakeChange that calculates and displays the conversion of an entered number of dollars into currency denominations—twenties, tens, fives, and ones. For example, $113 is 5 twenties, 1 ten, 0 fives, and 3 ones.Write a program named FahrenheitToCelsius that accepts a temperature in Fahrenheit from a user and converts it to Celsius by subtracting 32 from the Fahrenheit value and multiplying the result by 5/9. Display both values to one decimal place.Write a program named Eggs that declares four variables to hold the number of eggs produced in a month by each of four chickens, and assign a value to each variable. Sum the eggs, then display the total in dozens and eggs. For example, a total of 127 eggs is 10 dozen and 7 eggs.
- Choose the best data type for each of the following, so that no memory storage is wasted. Give an example of a typical value that would be held by the variable, and explain why you chose the type you did. the number of years of school you have completed your final grade in this class the population of China the number of passengers on an airline flight one players score in a Scrabble game the number of Electoral College votes received by a U.S. presidential candidate the number of days with below freezing temperatures in a winter in Miami, Florida one teams score in a Major League Baseball gameThe formula below decribes Newton's second law of motion Force = Mass x acceleration Using the variables below Write one line of code that will calculate the acceleration of a object. // Mass in Kg float mass = 50.3; // Froce in N int force = 720; //acceleration float accel; //One line of code to calculate the acceleration of a objectYou are given an integer variable dollarAmount that will have an integer value of ten or larger. It is a value that we want to display on a check. In order to write out the amount in words, the first step is to determine the digit from the ones position and from tens position. We are going to take those first steps! Declare an integer variable named ones and initialize it to the value in the ones position from dollarAmount. Declare an integer variable named tens and initialize it to the value in the tens position from dollarAmount. Declare an integer variable named hundreds and initialize it to the value in the hundreds position from dollarAmount. e.g. If dollarAmount = 1729,we would expect ones = 9, and tens = 2, and hundreds = 7. Sample input/output: Input Output 1729 Ones: 9 Tens: 2 Hundreds: 7 19452 Ones: 2 Tens: 5 Hundreds: 4 Output has been taken care of for you.
- Write a Phyton program that computes the duration of a projectile’s flight and its height above the ground when it reaches the target. As part of your solution, you should display instructions to the program user. Relevant formula: time = distancevelocity xcos (θ) height = velocity xsin x time- g x time22 use the following variables: g = gravitational constant = 32.17 = angle of elevation in radian v = velocity or the projectile velocity (ft/sec) d= distance to target t = time of flight in seconds. h = height at impact Try your program on these data sets.A nutritionist who works for a fitness club helps members by evaluating their diets. As part of her evaluation, she asks members for the number of fat grams and carbohydrate grams that they consume in a day. Then, she calculates the number of calories that result from the fat using the following formula: Calories from fat = Fat grams × 9Next, she calculates the number of calories that result from the carbohydrates using the following formula: Calories from carbs = Carbs grams × 4Create an application that will make these calculations. In the application, you should have the following methods:• FatCalories–This method should accept a number of fat grams as an argument and return the number of calories from that amount of fat.• CarbCalories–This method should accept a number of carbohydrate grams as an argument and return the number of calories from that amount of carbohydrates.Write a program that prints a grocery receipt of items purchased. The program must create variables for the following items: Milk = $2.00 Eggs = $ 3.00 Bread =$4.00 Orange Juice =$3.50 Apples = $4.00 Cookies = $3.25 Water = $3.00 A coupon of $1.00 was used. use a constant for a coupon. Calculate the bill, assume that 1 unit of all items was purchased use java programming language
- Write a program that computes the molecular weight of a carbohydrate (ingrams per mole) based on the number of hydrogen, carbon, and oxygenatoms in the molecule. The program should prompt the user to enter thenumber of hydrogen atoms, the number of carbon atoms, and the numberof oxygen atoms. The program then prints the total combined molecularweight of all the atoms based on these individual atom weights:Atom Weight(grams I mole)H 1.00794c 12.01070 15.9994For example, the molecular weight of water (H20) is: 2(1.00794) +15.9994 = 18.01528.In your favorite open world adventure video game, currency conversion is as given below: 1 Gold coin 23 Bolts 1 Gem 13 Gold coins Write a program that takes a number of Bolts as user input (as an integer) and converts it to the number of whole Gems, Gold coins, and Bolts as shown below. The conversion information between these measurement metrics is provided in the table above. The number of Bolts should be converted in such a way that maximizes the whole number of Gems and Gold coins. Expected output 1 (bold is user input) Enter the number of Bolts: 32 0 Gems(s) 1 Gold coin(s) 9 Bolt(s) Expected output 2 (bold is user input) Enter the number of Bolts: 3000 10 Gem(s) 0 Gold coin(s) 10 Bolt(s) The file should be named as convertCurrency.cpp. Don’t forget to head over to Coderunner on Canvas and paste your solution in the answer box!Please code in python In an alternate reality, chemistry Professors Hodge and Sibia have teamed up to design a chemical compound X such that when X is added to Dan’s favorite food (saltine crackers), it’ll make him despise it. For this, they are working with 6 kinds of extracts: Singleton Extracts: berries (B), green veggies (G), dairy (D) Combination Extracts: icecream (I), salad (S), and cheese sauce (C). Like regular food, mixing two extracts of the same kind will result in an extract of the same kind (eg. mixing berries B with berries B will result in berries B). Mixing two singleton extracts will result in a combination extract, using these rules: Berries (B) + Green Veggies (G) = Salad (S) Berries (B) + Dairy (D) = Icecream (I) Green Veggies (G) + Dairy (D)= Cheese Sauce (C) Mixing two combination extracts will result in a singleton extract closest to them. For example, Icecream (I) + Salad (S) is closest to Berries (B) since both Icecream and Salad extracts require using…