(General math) Modify the
When you have finished your verification, use your program to complete the following chart:
Trending nowThis is a popular solution!
Chapter 3 Solutions
C++ for Engineers and Scientists
- (In Matlab Coding) Pls send me solution in 5 min I will like your answer. Solution must be in typed form.arrow_forward(Computer Graphics)Using the Cohen-Sutherland line clipping algorithm, clip the line PQ with coordinates P (-5, 3) and Q (15, 9) against a clipping rectangular window with coordinates (0, 0) and (10, 10) as lower left and upper right corner respectively. Also, find intersection points if any.arrow_forward1. (Floating-Point Arithmetic). For each of the following numbers,(a) determine whether the number is a 4-digit oating-point number (the number of the FPA4);(b) if yes, write the number in the standard form ±0.d1d2d3d4 × 10n, where d1 is a nonzero digit and n ∈ Z;(c) if no, rst chop and then round the number to a number of the FPA4, written in the standard form:(i) − 0.989067000000001; (ii) − 51.8; (iii) − 900.377050000001; (iv) − 5000.0;(v) − 0.023409; (vi) 2036.0; (vii) 0.01814.arrow_forward
- (software quality engineering)Derive the test cases using boundary value analysisarrow_forward(Approximate 7) T can be computed using the following formula: 1.1 1 1 T = 4 x 1 11 5 Write a program that displays the result of 4 x ( 1 3 and 4 x (1 (1- Use 1.0 instead of 1 in your 13 3 11 program.arrow_forward(Algebra: solve quadratic equations) The two roots of a quadratic equation ax? + bx + c = 0 can be obtained using the following formula: -b + VB - 4ac and -b - VB - 4ac 2a 2a b - 4ac is called the discriminant of the quadratic equation. If it is positive, the equation has two real roots. If it is zero, the equation has one root. If it is negative, the equation has no real roots. Write a program that prompts the user to enter values for a, b, and c and displays the result based on the discriminant. If the discriminant is positive, display two roots. If the discriminant is 0, display one root. Otherwise, display "The equation has no real roots."arrow_forward
- (Perkovic, Problem 6.31b) Write a function testCraps that accepts a positive integer n as an input, simulates n games and craps, and returns the fraction of games the player won. ⚫ the testCraps function should not make dice rolls directly, instead... testCraps function should call the craps function repeatedly and keep track of the results • if you your craps and testCraps function simulate the game correctly without any extra rolls, you should be able to hit the results below exactly 1 >>> random.seed(0) 2 >>> testCraps (10000) 3 0.5 4 >>> random.seed(1) 5 >>> testCraps (10000) 6 7 8 0.4921 >>> [(i, random.seed(i), testCraps (100*i)) for i in range(1,10)] [(1, None, 0.49), (2, None, 0.46), (3, None, 0.47333333333333333), (4, None, 0.5125), (5, None, 0.476), (6, None, 0.47333333333333333), (7, None, 0.4514285714285714), (8, None, 0.48), (9, None, 0.4855555555555556)] 9 >>arrow_forward(Practice) Determine the value of the following expressions, assuming a=5,b=2,c=4,d=6,ande=3: a.abb.a!=bc.db==cbd.ac!=dbe.db==cef.!( ab)g.!( abc)h.!( cba)i.bcaarrow_forward(a) {w|w contains a 1 after a 0 and before another 0} (b) {w |w does not contain the substring 00} (c) {w |w contains an odd number of 1s or exactly one 0} 2. Use the algorithm you learned in class to convert the following NFA to an equivalent regular expression. a, A Poarrow_forward
- (python) Find at least 12 issues in the code. A = int(input("Enter a number for A: ")) B = str(input("Enter a number for B: ")) C = int(input("Enter a number for C: ")) #Check that user input for A is not 0. if A = 0: print("Your coefficient for 'A' MUST BE a value greater than 0, otherwise your equation is not a quadratic!") int(input(Please enter a new value for a:")) = A import math: //Compute the discriminant. disc = (B*B) - (4*A*C) #Display the disciminant computed. print("\nThe discriminant of your equation is", str(disc) + ".") #Check the sign of the computed discriminant if disc == 0: print("This equation has 1 real solution.") x = (-B + math.sqrt(disc)) / (2 * A) print("The solution to your equation is:", x) elif disc > 0 print("This equation has 2 real solutions.") x1 == (-B + math.sqrt(disc)) / (2 * A) x2 == (-B - math.sqrt(disc)) / (2 * A) print("One solution to your equation is:", x1) print("The other solution to your equation…arrow_forward(C PROGRAMMING ONLY!) Your task is to fill in the blank with the correct condition. 5. Finding the Impostorby CodeChum Admin There's this Dog game I played where a group of Dogs gather together and complete missions. One of them though is an impostor because it is not a real dog; its breed is not a dog breed. Your task is to find that impostor. To do this, you need to check Instructions: In the code editor, you are provided with the enum, DogBreed. Furthermore, an initial main() code is provided for you where the user is asked for what the breed of the Dog.Then, in lines 18 - 22, a partial code to check if the breed is valid or not is given.Your task is to fill in the blank with the correct condition. Make sure to use the values of the enum, DogBreed in checking. Input 1. Dog Breed Output Input the breed of the dog: 2Yup, the breed is validarrow_forward[THIS IS NOT GRADED] The question mentions the bouncy program; this is the bouncy program I have written that computes the total distance traveled by the ball given initial height, bounciness index, and number of bounces: height = float(input("Enter the height from which the ball is dropped: ")) bounciness = float(input("Enter the bounciness index of the ball: ")) distance = 0 bounces = int(input("Enter the number of times the ball is allowed to continue bouncing: ")) for eachPass in range(bounces): distance += height height *= bounciness distance += height print('\nTotal distance traveled is:', distance, 'units.') I will attatch the pre-existing code that the question provided. Thank you for your help.arrow_forward
- C++ for Engineers and ScientistsComputer ScienceISBN:9781133187844Author:Bronson, Gary J.Publisher:Course Technology Ptr