10 - In an examination, 500 students appeared. Out of these students, 38 % got A+ grade, 45 % got B+ and the remaining just passed. Assuming that no student failed, find the number of students who got A+, B+ and the number of students who just passed.(Python code)
Q: #include int main() float Bread = 1.09, Water = 2.18, Banana = 1.00, Meat = 7.99; // Unit for bread…
A: Solution: These two line are: //line-1 printf("You have %d loaves of bread, %d bottles of…
Q: Th e following sta tement should determine if x has a value other than 1 or 2.What is wrong with…
A: Value should be 0<x<1 and x>2
Q: aList = ["Cat", "Apple", "Dog", "Lion", "Orange"] animals = [] for i in range (len(aList)) : if…
A: GIVEN: aList = ["Cat", "Apple", "Dog", "Lion", "Orange"] animals = [] for i in range (len(aList))…
Q: A year in the modern Gregorian Calendar consists of 365 days. In reality, the earth takes longer to…
A: Start Input year If year is multiple of 4 If year is multiple of 100 If year is multiple of 400,…
Q: 9. Do in while.
A: Given : table students, course are given with column names From the above information, we will…
Q: Computer Science This is an introductory exercise to the manipulation of random variables with…
A: Solution:: import numpy as np def f(x): return np.exp(- 0.1*x**2)*x**4 def A(x): return…
Q: MATLAB QUESTION - As of 2018, the population of "A city" is 646 thousand and the population of "B…
A: %Data givencity_A = 646000;city_B = 269000;year = 2018;A_dec = 7.1;B_inc = 12.9; %checking passing…
Q: Using C++ common year in the modern Gregorian Calendar consists of 365 days. In reality, Earth…
A: Logic:- check for leap year logic. If userYear%400==0 then it is leap year simply return 1 from…
Q: craps (Perkovic, Problem 6.31a) Craps is a single player dice game, that proceeds as follows: 1. the…
A: The answer is given below:-
Q: Good Programming practices help in improving programs readability and understandability both for a…
A: The following are the changes done in program: Ask the user to enter the number. change the…
Q: F. Use the cyclical alphabetic encrypting code that shifts each letter 12 positions to code the…
A:
Q: Assume you work as a cashier in a restaurant. You must keep track of the amount of money your…
A: Solution:-- 1)The given question has required for the solution to be provided with the help of an…
Q: (using recursive function) Write programs that implement the following equations п Y 7K k=0
A: Since language is not defined so it is solved in C. The idea of solution is keep decreasing k untill…
Q: 3- Enter a=3; b=5; e=7, then clear the variable b only Matlab
A: Step 1 : Start Step 2 : Take user input for the variable a , b and c using the input() function.…
Q: BALLISTICS The range of an object (see Figure 5.12) shot at an angle 0 with respect to the waxis and…
A: % Defining the paramtersv = 20.0;g = 9.8; % Create vector thetatheta = linspace(0,pi./2,63);R =…
Q: ogramming problem Consider data points (xị, Y;), i = 0,..., n. We would like to interpolate them…
A: Newton's interpolation method.
Q: 6.57 (Computer-Assisted Instruction) The use of computers in education is referred to as…
A: Actually, c++ is a powerful general purpose language.
Q: 1. How many courses will you have on the first day? 2. If you want to attend courses only 2 days…
A: as per our guidelines we are supposed to answer only 3 sub-parts, please repost the remaining part…
Q: -Write the algorithm and the Pseudo code for the following the questions? 1. Write an algorithm to…
A:
Q: NOTE: (what your answer will contain) 1. Use C PROGRAMMING LANGUAGE ONLY 2. Use RECURSION type of…
A: The program is written in C Language. Please find the source code and output in the following steps.…
Q: In an ancient land, the beautiful princess Eve had many suitors. She decided on the following…
A: Iam using list instead of vector. c++
Q: given a non-negative integer x, the decimal portrayal of which contains n digits. You need to…
A: Here have to determine about red and black code problem statement.
Q: 2.16 LAB: Musical note frequencies On a piano, a key has a frequency, say f0. Each higher key (black…
A: Required: python On a piano, a key has a frequency, say fO. Each higher key (black or white) has a…
Q: After following statements have executed, find the value of the variable a. int a=2, i=0; while…
A: Here we are given with a = 2 and i = 0 Now we have a while loop whose condition is true till the…
Q: Check if number is prime
A: This is very simple. I have written a simple Python code to solve the problem. I have also attached…
Q: In C++ Please if you could show your work.
A: The answer is given below.
Q: 2. Write a program containing the recursive function that will find the following series of numbers…
A: I give the code in C(because you asked in C only) and also provide the output screenshot as well.
Q: A lecturer intends to separate his students into 2 groups based on their INDEX Numbers, those with…
A: Declare a static integer variable at class level, index, to hold the INDEX number of the student.…
Q: Write a program that takes in a year and determines whether that year is a leap year.
A: /******************************************************************************…
Q: Display the list of only leap years from years 2000 to 2025. If year/4 is equal to 0 and years/100…
A: #include <iostream>using namespace std;int main(){ int year;…
Q: NOTE (what your answer will contain) 1. Use CPROKGRAMMING LANGUAGE ONLY 2. Uae RECURSION type of…
A: Hey there, I am writing the required solution (code) below for the above stated question. First , I…
Q: How is the body of a for loop defined? A. The body of a for loop is defined by an indented block of…
A: Repetition statements or looping statements are used to repetitively perform a set of statements as…
Q: Exams.cpp) Suppose a teacher weights the four exams he gives 10%, 25%, 30%, and 35%. Write a program…
A: We have to create one C++ program which can solve the given problem and display the expected output.…
Q: Modified coin-row problem: If we modified the coin-row problem, so that you cannot take the adjacent…
A:
Q: 21. The five line bellow are used to determine the profit or loss of a sale based on the buying cost…
A: Given:
Q: main.c 2. Hide and Seek (Integral) by Catherine Arellano #include 2 #include"decimalPos.h" Your…
A: Paste the code that i provide below #include"decimalpos.h" or at the bottom of decimalpos.h file.…
Q: PROBLEM 23 – 0560: Write a Basic program to solve the following puzzle: A and B are the players. A…
A: The game is centered on the notion of congruence. Let x be the unknown number chosen by B, 1 ≤ x ≤…
Q: 3.6 LAB: Leap year A year in the modern Gregorian Calendar consists of 365 days. In reality, the…
A: The program approach: The program will take in a user input for year. It will then check the input’s…
Q: (in python 3) Take the username and password from a user and check the validity of the password…
A: 1. Take username and password as input from user 2. Check if password contains username, if yes…
Q: Assume that name and age have been declared suitably for storing names (like "Abdullah", "Alexandra"…
A: Actually, string is a sequence of characters.
Q: Python program - It must show the correct final grade debug the code: subjects = ["Math",…
A:
Q: Print the odd numbers between (100,200) using function void odd (int).
A: Here, Code instruction is given to print odd numbers between 100 and 200.
Q: [Python (py3)] The error in the code below is if the number of rows of the matrix is not equal to…
A: The modified program checking the equality of dimension is shown below: import numpy as npimport sys…
Q: Correct answer will be upvoted else Multiple Downvoted. Computer science. You are given two positive…
A: Here have to determine about the Row GCD programming problem statement.
Q: YTHON CODE FOR- Suppose an insurance company is insuring against burglary that happens with…
A: Task : Code the insurance policy in python. Add the histogram for the results.
Q: Q: Code using C++ You are given two integers, n and m. You want to make m equal to 0. You decide to…
A: We are given two, n and m. you want to make m equal to 0. we decide to keep repeating the following…
Q: ar in the modern Gregorian Calendar consists of 365 days. In reality, the earth takes longe sun. To…
A: Solution :
Q: Perform any two arithmetic operations on 'n' polynomials using the following options Structures in C…
A: Perform any two arithmetic operations on 'n' polynomials using the following options Structures in C…
10 - In an examination, 500 students appeared. Out of these students, 38 % got A+ grade, 45 % got B+ and the remaining just passed. Assuming that no student failed, find the number of students who got A+, B+ and the number of students who just passed.(Python code)
Step by step
Solved in 3 steps
- Interest Rates Savings accounts state an interest rate and a compounding period. If theamount deposited is P, the stated interest rate is r, and interest is compounded m timesper year, then the balance in the account after one year is P⋅(1+rm)m. For instance, if$1000 is deposited at 3% interest compounded quarterly (that is, 4 times per year), thenthe balance after one year is1000⋅(1+.034)4=1000⋅1.00754=$1,030.34.Interest rates with different compounding periods cannot be compared directly.The concept of APY (annual percentage yield) must be used to make the comparison. TheAPY for a stated interest rate r compounded m times per year is defined byAPY=(1+rm)m−1.(The APY is the simple interest rate that yields the same amount of interest after oneyear as the compounded annual rate of interest.) Write a program to compare interestrates offered by two different banks and determine the most favorable interest rate. SeeFig. 4.24.Interest on a credit card’s unpaid balance is calculated using the average daily balance. Suppose that netBalance is the balance shown in the bill, payment is the payment made, d1 is the number of days in the billing cycle, and d2 is the number of days payment is made before billing cycle. Then, the average daily balance is: averageDailyBalance =netBalance x d1-payment x d2d1 If the interest rate per month is, say, 0.0152, then the interest on the unpaid balance is: Interest= averageDailyBalance * 0.0152 Write a program using c++ compiler that accepts as inputnetBalance, payment, d1,d2, and interest rate per month. The program outputs the interest. Format your output to two decimal places.Interest on a credit card’s unpaid balance is calculated using the averagedaily balance. Suppose that netBalance is the balance shown in the bill, payment is the payment made, d1 is the number of days in the billing cycle, and d2 is the number of days payment is made before billing cycle. Then, the average daily balance is:averageDailyBalance = (netBalance * d1 – payment * d2) / d1If the interest rate per month is, say, 0.0152, then the interest on the unpaid balance is:interest = averageDailyBalance * 0.0152Write a program that accepts as input netBalance, payment, d1, d2, and interest rate per month. The program outputs the interest. Format your output to two decimal places.
- Use C++ A year in the modern Gregorian Calendar consists of 365 days. In reality, the earth takes longer to rotate around the sun. To account for the difference in time, every 4 years, a leap year takes place. A leap year is when a year has 366 days: An extra day, February 29th. The requirements for a given year to be a leap year are: 1) The year must be divisible by 4 2) If the year is a century year (1700, 1800, etc.), the year must be evenly divisible by 400 Some example leap years are 1600, 1712, and 2016. Write a program that takes in a year and determines whether that year is a leap year. Ex: If the input is: 1712 the output is: 1712 is a leap year. Ex: If the input is: 1913 the output is: 1913 is not a leap year. Your program must define and call the following function. The function should return true if the input year is a leap year and false otherwise.bool IsLeapYear(int userYear)python A year in the modern Gregorian Calendar consists of 365 days. In reality, the earth takes longer to rotate around the sun. To account for the difference in time, every 4 years, a leap year takes place. A leap year is when a year has 366 days: An extra day, February 29th. The requirements for a given year to be a leap year are: 1) The year must be divisible by 4 2) If the year is a century year (1700, 1800, etc.), the year must be evenly divisible by 400 Some example leap years are 1600, 1712, and 2016. Write a program that takes in a year and determines whether that year is a leap year. Ex: If the input is: 1712the output is: 1712 is a leap year. Ex: If the input is: 1913the output is: 1913 is not a leap year.Your program must define and call the following function. The function should return True if the input year is a leap year or False otherwise.def is_leap_year(user_year)Modified coin-row problem:If we modified the coin-row problem, so that you cannot take the adjacent coin, and youcannot take the coin next to the adjacent coin also (see example below), what would thedynamic programming formula F(n) be?Example: A, B, C, D, E, F, G, H, I, JIf A is taken, then B & C cannot be taken, but D (or above D, like E and so on) can be taken.If B is taken, then A, C, D cannot be taken.And so on.
- python code Problem 5 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 consumed in a day. Then, she calculates the number of calories that result from the fat, using the following formula: calories from fat = fat grams x 9. Next, she calculates the number of calories that result from the carbohydrates, using the following formula: calories from carbs = carb grams x 4 . Write a program that will make these calculations. Your program should use two separate functions to calculate fat and carb calories. Write a 3rd function that is called from main to capture user input and call the others.C++ Summary When you borrow money to buy a house, a car, or for some other purpose, you repay the loan by making periodic payments over a certain period of time. Of course, the lending company will charge interest on the loan. Every periodic payment consists of the interest on the loan and the payment toward the principal amount. To be specific, suppose that you borrow $1,000 at an interest rate of 7.2% per year and the payments are monthly. Suppose that your monthly payment is $25. Now, the interest is 7.2% per year and the payments are monthly, so the interest rate per month is 7.2/12 = 0.6%. The first month’s interest on $1,000 is 1000 X 0.006 = 6. Because the payment is $25 and the interest for the first month is $6, the payment toward the principal amount is 25 - 6 = 19. This means after making the first payment, the loan amount is 1,000 - 19 = 981. For the second payment, the interest is calculated on $981. So the interest for the second month is 981 X 0.006 = 5.886, that is,…4.21 LAB: Leap year - functions A year in the modern Gregorian Calendar consists of 365 days. In reality, the earth takes longer to rotate around the sun. To account for the difference in time, every 4 years, a leap year takes place. A leap year is when a year has 366 days: An extra day, February 29th. The requirements for a given year to be a leap year are: 1) The year must be divisible by 4 2) If the year is a century year (1700, 1800, etc.), the year must be evenly divisible by 400 Some example leap years are 1600, 1712, and 2016. Write a program that takes in a year and determines whether that year is a leap year. Your program must define and call the following function. The function should return True if the input year is a leap year or False otherwise.def is_leap_year(user_year) Here is code so far. I am stuck on this one. It is failing out on the 2: Unit testkeyboard_arrow_up 0 / 2 is_leap_year(1913) 3: Unit testkeyboard_arrow_up 0 / 3 is_leap_year(1600) 4:…
- Program - python 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 consumed in a day. Then, she calculates the number of calories that result from the fat, using the following formula: calories from fat = fat grams x 9. Next, she calculates the number of calories that result from the carbohydrates, using the following formula: calories from carbs = carb grams x 4. Write a program that will make these calculations. Your program should use two separate functions to calculate fat and carb calories. Write a 3rd function that is called from main to capture user input and call the others.Considering Leasing Cost To simplify our model assume leased cars. When leasing a car we only consider: The amount in dollars due at signing The number months for the entire lease The lease monthly cost The mileage allowance per month The cost of the charger if the vehicle is an electrical car We also consider the price of gas for gasoline-powered vehicles and electricity for electricity-powered vehicles. Because both gasoline and electricity prices vary from time to time, we will obtain this information from the user when we execute the program. We can break down the total cost into 2~3 parts: Fuel cost: totalMiles / milesPerUnitOfFuel * fuelPrice Lease cost: dueAtSigning + (numberOfMonths*monthlyCost) Charger cost if the vehicle is electric Then we can find the total cost to lease a car by simply summing all parts together. Considering Carbon Emissions Many people choose to buy an electric car, not because of cost but out of concern for the environment. This is a benefit that is…Interest on a credit card’s unpaid balance is calculated using the average daily balance. Suppose that netBalance is the balance shown in the bill, payment is the payment made, d1 is the number of days in the billing cycle, and d2 is the number of days payment is made before billing cycle. Then, the average daily balance is: averageDailyBalance = (netBalance * d1 – payment * d2) / d1 If the interest rate per month is, say, 0.0152, then the interest on the unpaid balance is: interest = averageDailyBalance * 0.0152 Write a program that accepts as input netBalance, d1, payment, d2, and interest rate per month (interestRate). The program outputs the interest. Format your output to two decimal places.