1

I'm new to Python and tried to make a simple program that prints out the Square roots of given numbers. However it prints the 3rd line with a small identation. I'd like to know what causes this.

Not sure what to do at this point. I'm still quite new to this.


import math

a = 4; b = 9; c = 16
print("Zahl\t\tWurzel")
print(a, "\t\t\t", math.sqrt(a), "\n",
      b, "\t\t\t", math.sqrt(b), "\n",
      c, "\t\t", math.sqrt(c))
user_in = input("Bitte geben Sie eine Zahl ein: ")
print("Die Wurzel ist: ", math.sqrt(int(user_in)))
Zahl        Wurzel
4            2.0 
 9           3.0 
 16          4.0
PyDario
  • 11
  • 2

0 Answers0