Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

16.9 Lab 5A: Quadratic Formula Revisited Overview Write a program that solves quadratic equations. This lab is very similar to Lab 4A However, this time

image text in transcribed
image text in transcribed
16.9 Lab 5A: Quadratic Formula Revisited Overview Write a program that solves quadratic equations. This lab is very similar to Lab 4A However, this time you must use the math library's square root function instead of using exponents. If you do not, you will not receive credit for this Lab, even if the autograding gives you points. Description Write a program that solves for x in a quadratic equation of the form az + bx+c=0 This is done by plugging in the values of a, b, and into the Quadratic Formulas -b- b2 - 4ac = - btvb2-4ac and 22= 20 Notice that there are two formulas. This will calculate two different x values Hint: If you are getting incorrect numbers, check to make sure you are using parentheses correctly! Note: Do not enter as a value for a, since division by O is illegal and the quadratic formula is only defined when a is not 0. Obiective Objective The objective of this lab is to practice using existing functions. Ex If the input is Enter a: 5 Enter b: 6 Enter C: 1 Then the output is: xl: -0.2 x2: 1.0 LAB ACTIVITY 16.9.1: Lab 5A: Quadratic Formula Revisited 0/20 U main.py Load default template 1a - int (input("Enter a: ")) 2b- int (input("Enter b: )) 3 - int (input("Enter C: ")) 5 x1 one wplace one with your calculation of x1 6 X2 - None Replace one with your calculation of x2 8 print("x1,x1) 9 print (x:",x2)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions