1 | initial version |

The easiest for your question is to explore using the <tab> key.

Define

```
sage: p = po['ly1']
```

then type this followed by <tab>

```
sage: p.
```

and you will see a list of available methods.

The method you are looking for is `leading_coefficient`

.

For the leading term, I'm afraid you have to do

```
sage: p.leading_coefficient() * x^p.degree()
```

Note that since the polynomials are univariate, you can use `.degree()`

and you don't have to specify `.degree(x)`

.

2 | No.2 Revision |

The easiest for your question is to explore using the <tab> key.

~~Define~~Having run your code, I got

```
sage: p = po['ly1']
-x + 2
```

then type this followed by <tab>

```
sage: p.
```

and you will see a list of available methods.

The method you are looking for is `leading_coefficient`

.

```
sage: p.leading_coefficient()
-1
```

For the leading term, I'm afraid you have to do

~~ ~~sage: p.leading_coefficient() * x^p.degree()
-x

Note that since the polynomials are univariate, you can use `.degree()`

and you don't have to specify `.degree(x)`

.

Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.