---
# System prepended metadata

title: 'lesson20: 小テスト復習（授業練習用）'
tags: [練習用]

---

# lesson20: 小テスト復習（授業練習用）
## 
###### tags: `練習用`
## 例：
:::info
Code:
```python=
r = float(input("Please input value r:"))
r_Round = r * 2 * 3.14
r_Area = r * r * 3.14
print("The round:", r_Round)
print("The area:", r_Area)
```
結果：
![](https://i.imgur.com/u7n9gvs.png)
:::

---
## 1.
:::info
Code:
```python=
number=[1,2,4,5]
number.insert(2,3)
print(number)
```
結果：


runfile('C:/Users/user/.spyder-py3/autosave/untitled20.py', wdir='C:/Users/user/.spyder-py3/autosave')
[1, 2, 3, 4, 5]




:::

---

## 2.
:::info
Code:
```python=
number=[283,768,77,8,2077]
number_sum=0
for i in range(len(number)):
    number_sum+=number[i]
print(number_sum)
```
結果：

3213



:::

---

## 3.
:::info
Code:
```python=
number=[283,768,77,8,2077]
l=len(number)
temp=number[0]
number[0]=number[l-1]
number[l-1]=temp
print(number)
```
結果：
runfile('C:/Users/user/.spyder-py3/autosave/untitled20.py', wdir='C:/Users/user/.spyder-py3/autosave')
[2077, 768, 77, 8, 283]




:::

---

## 4.
:::info
Code:
```python=
allist=["c++","java","python"]
for i in allist:
    print(i,end=" ")
```
結果：

c++ java python 

:::

---

## 5.

:::info
Code:
```python=

```
結果：



:::

---
## 6.
:::info
Code:
```python=

```
結果：


:::

---

## 7.
:::info
Code:
```python=

```
結果：

:::

---

## 8.
:::info
Code:
```python=

```
結果：

:::

---

## 9.
:::info
Code:
```python=

```
結果：

:::

---

## 10.

:::info
Code:
```python=

```
結果：