-5

i don't know why that appears when i try to run. i tried to fix but i can't. is there any errors?

import math

print(" Hello....\n This program will ask you to enter 3 numbers \n (a, b and c) that will be used in the quadratic formula to \n calculate the roots of an equation ")

a=float(input("Enter a Value for a: "))

while(a <= 0):

print(" Please enter a number that is larger than 0.") <br/>
a=float(input("Please enter a value for A: "))

b=float(input("Enter a Value for b: "))

while(b <= a): <br/>
print(" Please enter a value that is larger than A.") <br/>
b=float(input("Enter a value for B: "))

c=float(input("Enter a Value for C: "))


root1 = float(-b + math.sqrt(b * b - 4 * a * c)/(2 * a)) <br/>
root2 = float(-b - math.sqrt(b * b - 4 * a * c)/(2 * a))

print("Root 1 is " , root1)<br/>
print("Root 2 is " , root2)<br/>
input("prompt: ")
BrenBarn
  • 242,874
  • 37
  • 412
  • 384
  • 2
    Yes, you need to indent the code that you want to be inside the `while` loop. Also please don't add a bunch of irrelevant tags to your question. – BrenBarn Jan 31 '16 at 07:41
  • 1
    Also, why do you have all those `
    ` in what's supposed to be Python code? You may find the answers to this question helpful: [Asking the user for input until they give a valid response](http://stackoverflow.com/q/23294658/4014959).
    – PM 2Ring Jan 31 '16 at 07:46
  • 3
    Only inexperienced programmers fail to indent code, regardless of the language. The only difference with Python is that it is mandatory. – cdarke Jan 31 '16 at 07:54

1 Answers1

0

First: In Python, indenting is a must. It is a syntactically feature to have nested code indented instead of spamming the source with paranthesis'.

Second: Obviously, you copy pasted HTML code from somewhere. Get rid of <br />.

ferdy
  • 7,366
  • 3
  • 35
  • 46