Warning
 courses:be5b33prg:homeworks:quadratic_equation [2016/10/27 12:42]xposik [Quadratic equation solver] courses:be5b33prg:homeworks:quadratic_equation [2016/11/04 16:03]xposik Both sides previous revision Previous revision 2016/11/04 16:03 xposik 2016/10/27 12:42 xposik [Quadratic equation solver] 2016/10/27 12:42 xposik [Quadratic equation solver] 2015/10/02 17:49 svobodat 2015/10/02 17:29 svobodat created Next revision Previous revision 2016/11/04 16:03 xposik 2016/10/27 12:42 xposik [Quadratic equation solver] 2016/10/27 12:42 xposik [Quadratic equation solver] 2015/10/02 17:49 svobodat 2015/10/02 17:29 svobodat created Line 1: Line 1: ====== Quadratic equation solver ====== ====== Quadratic equation solver ====== + + + See the general [[courses:​be5b33prg:​tutorials:​homeworks|homework guidelines]]! + ​ + Create a text file ''​quadeq.py''​. In it, define function ''​get_roots(a,​ b, c)''​ which Create a text file ''​quadeq.py''​. In it, define function ''​get_roots(a,​ b, c)''​ which * accepts the coefficients $a$, $b$, and $c$ of a quadratic equation $ax^2 + bx + c = 0$, and  ​ * accepts the coefficients $a$, $b$, and $c$ of a quadratic equation $ax^2 + bx + c = 0$, and  ​ - * returns a list of its real roots, i.e. the function returns ​ + * returns a list of its real roots, i.e., the function returns ​ * a list with 2 numbers when the equation has 2 real roots, ​ * a list with 2 numbers when the equation has 2 real roots, ​ * a list with a single number when the equation has a single root only, or * a list with a single number when the equation has a single root only, or 