Question: My main issue is this error being displayed:

```
TypeError: a float is required

```

I haven't tried much as I don't really know what I'm doing, being very new to coding and all, so I would appreciate some patient advice on the matter.

```
from math import sqrt

n = raw_input('Type number here: ')

def square_root(n):
  """Returns the square root of a number."""
  square_rooted = sqrt(n)
  print "%d square rooted is %d." % (n, square_rooted)
  return square_rooted

square_root(n)

```

I want to be able to type in a number and it display the square root of it.

Answer: 
Some issues/fixes for your code

* You need to cast the string you got from [raw\_input](https://docs.python.org/2/library/functions.html#raw_input)
* To display float, use `%f` string formatting

So the code will change to

```
from math import sqrt
#Convert string obtained from raw_input to float
n = float(raw_input('Type number here: '))
def square_root(n):
  """Returns the square root of a number."""
  square_rooted = sqrt(n)
  print "%f square rooted is %f." % (n, square_rooted)
  return square_rooted

square_root(n)

```

And the output will look like

```
Type number here: 4.5
4.500000 square rooted is 2.121320.

```
As mentioned above perhaps python3 is the better python version to be using if you are new but the python 2 solution would look like below. Where we use %f to indicate our number is a float. In addition on line 2 we wrap the raw\_input() statement in a float() function. This allows the python interpreter to understand we expect a float value. 

```
from math import sqrt

n =float(raw_input('Type number here: '))

def square_root(n):
  """Returns the square root of a number."""
  square_rooted = sqrt(n)
  print "%f square rooted is %f." % (n, square_rooted)
  return square_rooted

square_root(n)

```

The python 3 version would be below just a few minor edits. The input line would now become input() not raw\_input()... Also the print statement would use parentheses on the sides:

```
from math import sqrt

n =float(input('Type number here: '))

def square_root(n):
  """Returns the square root of a number."""
  square_rooted = sqrt(n)
  print("%f square rooted is %f." % (n, square_rooted))
  return square_rooted

square_root(n)

```