# math.radians() method with example in Python

Python math.radians() method: Here, we are going to learn about the math.radians() method with example in Python.
Submitted by IncludeHelp, on April 25, 2019

math.radians() method is a library method of math module, it is used to convert angle value from degree to radians, it accepts a number and returns the angle value in radians.

Note: math.radians() method accepts only numbers, if we provide anything else except the number, it returns error TypeError"TypeError: a float is required".

```    math.radians(x)
```

Parameter(s): x – is the number in degree to be converted into radians.

Return value: float – it returns a float value that is the angle value in radians.

Example:

```    Input:
x = 10.25

# function call

Output:
0.17889624832941878
```

### Python code to demonstrate example of math.radians() method

```# Python code to demonstrate example of

# importing math module
import math

x = 0

x = 0.25

x = 10.25

x = -0.25
```

Output

```math.radians( 0 ):  0.0
```

TypeError example

```# Python code to demonstrate example of

# importing math module
import math

x = "10"
```

Output

```Traceback (most recent call last):
File "/home/main.py", line 9, in <module>
TypeError: a float is required
```

Languages: » C » C++ » C++ STL » Java » Data Structure » C#.Net » Android » Kotlin » SQL
Web Technologies: » PHP » Python » JavaScript » CSS » Ajax » Node.js » Web programming/HTML
Solved programs: » C » C++ » DS » Java » C#
Aptitude que. & ans.: » C » C++ » Java » DBMS
Interview que. & ans.: » C » Embedded C » Java » SEO » HR
CS Subjects: » CS Basics » O.S. » Networks » DBMS » Embedded Systems » Cloud Computing
» Machine learning » CS Organizations » Linux » DOS
More: » Articles » Puzzles » News/Updates