Converting Between Degrees And Radians

## Description

Here is an example of a simple Sage interact. In order to convert radians to degrees we multiply the radians by $\dfrac{180}{\pi}$. The Sage cell below shows the degrees of $\pi$ radians.

## Sage Cell

#### Code

```
@interact
def _(radians = input_box(default= pi)):
degrees = radians*(180/pi)
pretty_print(html(r"$radians = %s$" %radians))
pretty_print(html(r"$degrees = %s$" %degrees))
```

## Options

#### Option

In order to convert degrees to radians we multiply the degrees by $\dfrac{\pi}{180}$. The Sage cell below shows the radians of $180$ degrees.

#### Code

```
@interact
def _(degrees = input_box(default= 180)):
radians = degrees*(pi/180)
pretty_print(html(r"$degrees = %s$" %degrees))
pretty_print(html(r"$radians = %s$" %radians))
```

## Tags

Primary TagsāPrecalculus: Geometric and algebraic foundations for trigonometry

Secondary TagsāGeometric and algebraic foundations for trigonometry: Radians, converting radians & degrees

## Related Cells

None

## Attribute

Permalink: http://www.gregorybard.com/Sage.html

Author: Gregory V. Bard, *Sage for Undergraduates*.

Date: 29 Oct 2018 00:37

Submitted by: James A Phillips