Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I'm am having trouble completing this block of code. If someone could help me figure out my mistakes and how to finish it, I would

image text in transcribed

image text in transcribed

I'm am having trouble completing this block of code. If someone could help me figure out my mistakes and how to finish it, I would greatly appreciate the help because I am really stuck and confused. Thanks in advance

X Dry - Cusers WNER\Downloads Discriminant2(AG)py @ 12:6 Edit View Run Device Tools Help sible using coefficients of a user's choice _info_(AG).py Discriminant_AG) by Myinfa2 (AG).py Discriminant (AG).py RandomStuff.py RandomStuft2.py untitled 1 from math import * #Discriminat 2 assignment 2 print("This program will calculate discriminant and the roots of a quadratic equat 10 3 a=int(input("Please input the first coefficient: ")) #Variable assignment to 4 beint(input("Please input the second coefficient: ")) 5 c=int(input("Please input the third coefficient: ")) 6 print) 7 discab**2-4*a*c #b^2-4ac-discriminate formula print(disc) 9 print (round(float(disc))) 18 sol1=(-b + sqrt(disc))/2*a #positive quadratic formula 11 sol2=(-b - sqrt(disc))/2*a #negative quadratic formula 12 print(soli) 13 print(sol2) Shen This program WILCacat GISerant and the TOOLS O Please input the first coefficient Please input the second coefficient: 2 quadratic equation 20 1.2360679774997898 -3.23606797749979 O Type here to search A ENG 7:53 PM 1/14/2020 Python Homework 4: Discriminant2 (Initials) Document each block of code i.e. Use"#" to comment out' a description of what a block of code does. Create a program that will calculate the discriminate of a quadratic equation and the roots from coefficients of a user's choosing. Have the program print out the answer rounded as a float type with variable names. Use a command code to put a variable on its own line and use the sep function to print the answers as a comma-separated list. (You'll print out the answers twice.) "You will need to begin your program with: import math to use something like math.sqrt(16) as a function. or: from math import to use something like sqrt(16) as a function. Previous

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored 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

Recommended Textbook for

Advances In Spatial And Temporal Databases 10th International Symposium Sstd 2007 Boston Ma Usa July 2007 Proceedings Lncs 4605

Authors: Dimitris Papadias ,Donghui Zhang ,George Kollios

2007th Edition

3540735399, 978-3540735397

More Books

Students also viewed these Databases questions

Question

Evaluating Group Performance?

Answered: 1 week ago