---
# System prepended metadata

title: Python Exercise 4

---

# Python Exercise 4
tags: python2021
繳交格式：
以學號命名的zip壓縮檔

程式作業 (1~4) 取名為：**ex4-1.py, ex4-2.py, ex4-3.py**…，不符合者視為缺交。
## Exercise 4-1
Given list: `species = ['Homo sapiens', 'Alces laces', 'Ursus americans', 'Pinus banksiana']`

Please use the given list to print the species from the last one to the first one in for loop

Result:
![](https://i.imgur.com/C24pg8h.png)
## Exercise 4-2
Please print Multiplication Table by using nested loop 
Tips: `print("content", end='')`->print without newline
Use “`\t`” to separate multiplication in the same row

Result:
![](https://i.imgur.com/79h6N8H.png)

## Exercise 4-3
Please print multiple “`*`”, the result need to be like this:

Must finish printing star in nested loop
Cannot simply print stars in multiple single loops

Result:
![](https://i.imgur.com/zUZO8Lb.png)

## Exercise 4-4
Given a list: `numbers = [10,9,8,7,6,55,4,3,2,1]`

Please sort and print the list, then calculate and print the sum of the list
![](https://i.imgur.com/YYUJxyD.png)
