Retired

Quadratic Solver Part 2 (Factorising) (retired)

Description:

Hello again fellow coders!

If you don't know, I previously made a kata on solving quadratic equations. I suggest you read about / attempt the kata here: https://www.codewars.com/kata/quadratic-solver-part-1/train/python

This one, however, is a little more advanced.

If you're not familiar, the quadratic formula is: Image result for quadratic formula

In this challenge, you will be given 3 numbers and will have to return the factorised version of the equation as a string. The sorting should be that of which the smaller number in the bracket is first. The solutions should be rounded to one decimal place.

In this kata, a will always be 1 to reduce confusion.

Example: Say that b=8 and c=16, your solution should return the following string:

"(x+4.0)(x+4.0)"

Little note: You may have an issue where in this case it returns:

"(x+4)(x+4)"

Please ensure it returns it as a float even if it is a whole number.

If you have any questions please feel free to ask and if there are any issues let me know! This is my second and most complicated kata I have made so far so I'm sure it's a little confusing to understand or the solutions are a little messed up, so sorry about that in advance. :)

Mathematics
Algorithms

More By Author:

Check out these other kata created by UppyMeister

Stats:

CreatedFeb 3, 2017
Warriors Trained301
Total Skips69
Total Code Submissions463
Total Times Completed76
Python Completions76
Total Stars4
% of votes with a positive feedback rating76% of 41
Total "Very Satisfied" Votes25
Total "Somewhat Satisfied" Votes12
Total "Not Satisfied" Votes4
Total Rank Assessments42
Average Assessed Rank
7 kyu
Highest Assessed Rank
5 kyu
Lowest Assessed Rank
8 kyu
Ad
Contributors
  • UppyMeister Avatar
Ad