the country, and its annual death rate. The program should then calculate the expected population for the following d display the results as shown in Figure 6. note that population for the following year is calculated as sum of the current population, and the number of births end of the year minus the number of deaths by the end of the same year. your program Lab3_Id ex6.py, where Id is your university Id. Include the design of your solution as comments peginning of your program. Test your solution with different input data. Please enter the current population of the country: 1800000
Q: In this task, you have to calculate the interquartile range (IQR) and the median values of CO2…
A: The solution to the given problem is given below: 1) Solution to TASK 1 * pandas library is for…
Q: In this task, you need to evaluate the following four expressions and demonstrate at least 5 steps…
A: a%(b-c)/d+(e*f) 2%(1-5)/21+(50 * 2) 2%(-4)/21+100 0/21+100 100 100 is the final answer
Q: Write a program to find the results of the following options Select case 1_Marriage numbers group 0…
A: The Select-Case statement in vb evaluates a variable or expression and determines the actions to be…
Q: Consider the following code to answer below questions: public double calculatePerimeter(Shapes []…
A: Answer 1) In the above code violated, KISS Principle. KISS Stands for keep it simple and stupid…
Q: Create the Flow Chart and JAVA. Input the following: Sex[Male or Female], Course[Indicate all…
A: In questions with many parts, we must solve the first 3. Except the city constraint, all other…
Q: which design principle is violated in the above code? what is the issue/ limitation of this code?…
A: Given Code: public double calculatePerimeter(Shapes [] shapes) { double p = 0;for…
Q: Write a program to input each staff's information of a company (Including name, status of Covid-19…
A: //c program #include <stdio.h> int main() { char name[5][20],status[5]; int…
Q: Based on electric tariff below, you are required to write a problem analysis, draw a flowchart, and…
A: Here we draw simple flow chart: ================================== Figure 1:
Q: Please show the steps: While using Mathematica, plot a hypotrochoid Spirograph (R=6, r=2, p = 0.5)…
A: Code: import matplotlib.pyplot as pltfrom math import * #R,r - Radii of the circles#d - Distance of…
Q: In this task, you need to evaluate the following four expressions and demonstrate at least 5 steps…
A: -(a%b-c/d+e*f)let a=1, b=1, c=1, d=1, e=1, f=1 as we are allowed to choose values with appropriate…
Q: Create a charge invoice program for the cashier at the RTU-Kawani cooperative. The program will…
A: PROGRAM INTRODUCTION: Include the required header files. Start the definition of the main function.…
Q: Randomly generate a number in range [1, 12]. Map this number to a season: if the number is 3, 4, or…
A: Programming Language => PYTHON I have provided PYTHON CODE along with CODE SCREENSHOT…
Q: Write code to get information of 5 students (Exam id , average) then check the average them if it is…
A: As no programming language is mentioned, it is solved using basic C++
Q: Identify the incorrect variable name from the following. O a. 2cityheight O b. city$heights2 O c.…
A: A variable is a piece of memory that can contain a data value. A variable thus has a data type.
Q: Add formulasto complete the table of hours used. In cell B17, create a nested formula with the IFand…
A: Formula Implement:
Q: Given the following definition of students, complete this expression to retrieve Emma's age.…
A: Given Entity is a list and by using index value we can access the each element in list Here, each…
Q: Bob employs a Landscaping company that wants to use your services to help create an invoice…
A: We need to take input the number of hours worked by an employee. Then we know that they charge $30…
Q: Exercise 4 Using the 3 methods above, create an application that calculates the roots of an equation…
A: GIVEN:
Q: Question 2 The following code segment will print “Congratulation! Correct answer". [Keratan aturcara…
A: Given:
Q: Write the following string with your information: string="Moead Rehan 19-arid-814"
A: Huffman Coding Coding from Huffman is the lossless algorithm for data compression. The goal is to…
Q: Q1 // Follow the following program, explaining the results: (If you know that L is your grade in the…
A: - We have to track the values of L and K from the program given.
Q: Which C++ statement that multiplies the contents of the first element in the price array by .15 and…
A: Option A cannot be the correct answer because the price array is multiplied by 12 but not 15, but…
Q: fice of plane 1000$ by default, but discounts are applied to it based on different criteria. 1-…
A: As per the given question, Case 1: If the person is student, then the student gets 20%discount. Case…
Q: Rav has the date which is not in proper order (proper order means dd/mm/YYYY. your task Is to help…
A: Since programming language is not mentioned so I have used Python programming language. Solution:…
Q: Write a Scilab code to calculate the surface area and volume for a cube, cuboid, cone, and cylinder.…
A:
Q: Make a School Fee Calculator using formula and Function in Excel. Provide your formula on the blank…
A: Let's fill up the Black blank cells, for the 4th year The following are the fields that has to be…
Q: Expressions For each expression in the left-hand column, indicate its value in the right-hand…
A: 1. Given expression: 1 + 2 * 3 - 4 * 5 * has highest precedence followed by +,- So, the given…
Q: Question No: 01 02123nt505 This is a subjective question, hence you have to write your answer in the…
A:
Q: Assuming that total is a variable, how else could you express in code the: total=total+2 NOTE: Avoid…
A: Given statement: total=total+2
Q: If the input is negative, make numltemsPointer be null. Otherwise, make numltemsPointer point to…
A: I have provided C++ CODE along with CODE SCREENSHOT and also provided TWO OUTPUT…
Q: Consider the following code to answer below questions: public double calculatePerimeter(Shapes []…
A: Principle of method is violated in line 1 because when you write the method with parameters it…
Q: As part of the discussion forum for this unit, you will be solving a programming problem from the…
A: Modulus operator(%) is used to remainder of division.
Q: String [] countyNames = {"Kings", "Albany", "New York", "Orange", "Bronx", "Queens", "Richmond"};…
A: Introduction: The above java program depicts the concept of the array of string type and the size of…
Q: Create code to check a course mark and give the equivalent letter grade as shown in the table below:…
A: Please find the answer below :
Q: Complete the following Truth Table
A: Here the operation we have are ~q,~r , <-> and v Now paranthesis has highest precedence. So…
Q: Calculate the wages of an employee by engaging the user with the input command to enter their hourly…
A: Below is the required code in MATLAB to calculate the wages of an employee:
Q: ead your name and one numeric value [Omani Rial], print the following menu as shown in below output,…
A: Algorithm: Input name Input amount Display menu Input choice Switch(choice) case 1: convert to…
Q: Which of the following structures can be applied to use cases? O Graphs Logical expression Input…
A: Refer to step 2 for the answer.
Q: How many total stars will be displayed by each of the following program segments? A) for (row = 0;…
A: Part A will print 600 stars.
Q: Read an integer value into variable num1 and another integer value into variable num2 and to do the…
A: Note: Programming language is missing in the question. So we will answer this program in C++…
Q: Add formulas to complete the table of hours used. In cell B17, create a nested formula with the IF…
A: I am first showing the formula sheet of EXCEL then I will show the result table
Q: Given: enum cropType {WHEAT, CORN, RYE, BARLEY, OATS}; cropType crop; which of the following…
A: Given code:
Q: what is the value of result variable after the following code:- * Dim result = 0 RadioButton1 If…
A: Answer : - option A) 12
Q: The following program which was submitted as extra credit in week 7 prints out a triangle of stars…
A: Code: main: pushrbp movrbp, rsp subrsp, 16 movDWORDPTR [rbp-4], 4 jmp.L2 .L5: moveax, DWORDPTR…
Q: The following variable declaration to hold the level of a student's second degree contains a…
A: The below is the syntax for variable declaration: datatype identifier_name; Data type can be int,…
Q: Question 2 / 20 Consider the following code segment and identify the line number that will cause a…
A: The error and its solution is given below
Q: bob employs a painting company that wants to use your services to help create an invoice generating…
A: Display "Please enter the working hours in week" Declare a variable workingHours Input the number of…
Step by step
Solved in 3 steps with 2 images
- (Statistics) This is the formula for the standard normal deviate, z, used in statistical applications: z=(X)/ X is a single value. refers to an average value. refers to a standard deviation. Using this formula, you need to write a program that calculates and displays the value of the standard normal deviate when X=85.3,=80,and=4. a. For this programming problem, how many outputs are required? b. How many inputs does this problem have? c. Determine a formula for converting input items into output items. d. Test the formula written for Exercise 7c, using the data given in the problem.Problem: A small company needs an interactive program to compute an employee’s paycheck. The payroll clerk will initially input the data, and given the input data, an employee's wage for the week should be displayed on the screen for the payroll check. The data for the employee includes the employee's hourly pay rate and the number of hours worked that week. Wage is equal to the employee's pay rate times the number of hours worked (up to 40 hours). If the employee worked more than 40 hours, wage is equal to the employee's pay rate times 40 hours plus 1½ times the employee's pay rate times the number of hours worked above 40. Instructions: Match the action at the left-side with the correct step number at the right-side (the attached picture). Note that it may be possible to group more than one related actions in the same logical step / process without altering the essence of the algorithm. In the program flow, input and checking of hourly pay rate should come before that of the number…Problem Description: The bird of paradise called the Helipixsal is renowned for its magnificent tail feathers which range in number from five to nine ornate feathers each of a different length. Their "magnificence" is quantified by the rather simple process of counting the exact number of tail feathers and multiplying this by the difference in the length of the minimum and maximum lengths of tail feather. You are to write a simple program that will allow the user to enter the length of each tail feather individually and keep on entering feathers until a -1 is entered. The program will then return the quantified "magnificence" factor.
- Assignment Write a program that tracks how much steps the user walks in total in a day and reports if the daily target is reached or not. The program will keep reading double values, each representing steps walked during an individual activity within a day (stepsWalked) until either the user enters a negative value or the daily target of 5000 steps is met. If the user enters a negative number, the program should print total steps walked as a double. Otherwise, if the target is exactly reached, the program should simply print "Target is reached", finally if the target is surpassed the program should print the text "Target is surpassed by", followed by the excess amount above the target as a double, and finally printing the text "steps". NOTE: You MUST use a repetitive statement in this question. NOTE: Each stepsWalked value will be given as a non-negative value. You do NOT need to check this. Input Output Answer assignment 3000 1300 500 2305.2 Target is surpassed by 2105.2 steps 450…MATLAB QUESTION - As of 2018, the population of "A city" is 646 thousand and the population of "B city" is 269 thousand. While the population of "A city" decreases by 7.1% every year, the population of "B city" increases by 12.9%. According to this information, write a program that calculates the year in which the population of "B city" passed the population of "A city".Problem Description: In the Whimsical Library, each book is enchanted with a magical code to ensure the protection of knowledge. The validation process for these magical codes involves a combination of mathematical spells. The validation process is described as follows: Take the sum of the digits at odd positions from left to right. Take the sum of the squared digits at even positions from left to right. If the absolute difference between the results from step 1 and step 2 is a prime number, the book code is considered valid; otherwise, it is invalid. Example 1: Consider the magical book code 86420137. Step 1. Take the sum of the digits at odd positions from left to right. 8+4+0+3=15 Step 2. Take the sum of the squared digits at even positions from left to right. 6^2+2^2+1^2+7^2=36+4+1+49 = 90 Step 3. If the absolute difference between the results from step 1 and step 2 is a prime number. 115-901 75 (not a prime number) Book code 86420137 is invalid. Example 2: Now, let's examine the…
- Exercise 2: Hospital Patients Write a program that computes and displays the charges for a patient’s hospital stay. First, the program should ask if the patient was admitted as an inpatient or an outpatient. If the patient was an inpatient, the following data should be entered: The number of days spent in the hospital The daily rate Hospital medication charges Charges for hospital services (lab tests, etc.) The program should ask for the following data if the patient was an outpatient: Charges for hospital services (lab tests, etc.) Hospital medication charges The program should use two overloaded functions to calculate the total charges. One of the functions should accept arguments for the inpatient data, while the other function accepts arguments for outpatient information. Both functions should return the total charges and display it for the user. After the total charges have been calculated and displayed, write the result to a file,…Exercise #4: Write a program that finds the area of a triangle given the base and the height of a triangle, the area of a triangle is calculated using the formula: area = 1/2* base * height Ask the user to enter the values for the input data base and height. Make sure you print the results in the similar way as in the exercise # 2: For example: The area of a triangle with base = printThe Value and height = printTheValue is = print The Value Submission: • Save the file as hw1_ex4.cpp Triangle Solve for area A h, b 2 b Base h₂ Height Enter value Enter value k bExercise II Write a program that finds the positive integer solutions of the following equation ax³ + bx² + cx' + d = 0. The user enters the values of coefficients a, b, c and d. The program should test each integer starting from -50 to 50, and each time the equation is equal to zero, it prints its value as well as "is a solution". At the end, it displays the total number of positive integers found. Note that if the equation has more than one solution, the plural word “solutions" is used in the output. Sample run 1: Enter the coefficient of a, b, c, d: 1 -8.5 21 -13.5 1 is a solution 3 is a solution The equation has 2 integers as solutions Sample run 2: Enter the coefficient of a, b, c, d: 6 48 103.5 67.5 The equation has no integer solutions Sample run 3: Enter the coefficient of a, b, c, d: 1 -1 -12 0 4 is a solution The equation has 1 integer solution
- use C++ programming language Write a program that computes and displays the charges for a patient’s hospital stay. First, the program should ask if the patient was admitted as an inpatient or an outpatient. If the patient was an inpatient, the following data should be entered: The number of days spent in the hospital The daily rate Charges for hospital services (lab tests, etc.) Hospital medication charges If the patient was an outpatient, the following data should be entered: Charges for hospital services (lab tests, etc.) Hospital medication charges Use a single, separate function to validate that no input is less than zero. If it is, it should be reentered before being returned. Once the required data has been input and validated, the program should use two overloaded functions to calculate the total charges. One of the functions should accept arguments for the inpatient data, while the other function accepts arguments for outpatient data. Both functions should return the…Future Investment Value = investment amount * (1 + monthly interest)^(number of years * 12) Using this formula, write a function in Python called futureValue that prompts the user to enter an investment amount, an annual percentage interest rate, and the amount of years. The function should accept the input as arguments. The interest rate should have a default value of 7%. You can add default values of your choice for the amount of years. This function should print out a table that displays the future values. Demonstrate this function in another function called main. Format your output by two decimal places. Output Example: Enter the amount you want to invest: 1000 [Enter] Enter the interest rate for your investment: [Enter] Enter the number of years you want to invest this money: 30 [Enter] Years Future Value 1 1093.81 2 1196.41 ........ 30 14730.58Language: Python Write a program that computes and displays the charges for a patient's hospital stay. First, the program should ask if the patient was admitted as an in-patient or an out-patient. If the patient was an in-patient the following data should be entered: - The number of days spent in the hospital - The daily rate -Charges for hospital services (lab tests, etc.) -Hospital medication charges If the patient was an out-patient the following data should be entered: -Charges for hospital services (lab tests, etx.) -Hospital medication charges Use a single, seperate function to validate that no input is less than zero. If it is, it should be re-entered before being returned. Once the required data has been input and validated, the program should use two seperate functions to calculate the total charges. One of the functions should accept arguments for the in-patient data, which the other function accepts arguments for out-patient data. Both functions should return the total…