Python:Formatting Numbers Tutorial

A floating point number includes a decimal point for example:

```3.1
3.1415```

You might want to look at the following before tackling these questions:

Population in millions to one decimal place

For the countries of South America, show the name and the population in millions.

Example:

`Argentina 39`

[Font] [Default] [Show] [Resize] [History] [Profile]

Area

For the countries of South America show the name and the area in thousands of square kilometers to two decimal places.

Use 20 character spaces for the name and 10 for the area.

Example:

`Peru                   1285.22`

[Font] [Default] [Show] [Resize] [History] [Profile]

per Captia GDP

Show the name of the country and the per capita gdp for countries of Asia.

Use 20 character spaces for the name and 10 for the per capita GDP. Show the per capita GDP to two decimal places. The values are in US dollars, so include the \$ sign right after the name.

Example:

`China               \$   1290.00`

[Font] [Default] [Show] [Resize] [History] [Profile]

Richer countries

The per capita GDP of the UK is a little less than \$34,000

Show the name and GDP of those countries with a per capita GDP of more than 29000

Use 25 character spaces for the name and 10 for the per capita GDP. Show the per capita GDP to two decimal places. The values are in US dollars, so include the \$ sign right after the name.

Example:

`United Kingdom          \$  29483.08`

[Font] [Default] [Show] [Resize] [History] [Profile]