per = ["10.31", "", "8.00"]

for i in per:
    try:
        print(float(i))
    except:
        print(0)
```

### 297. 예외처리 및 리스트에 저장

문자열로 표현된 PER 값을 실수로 변환한 후 이를 새로운 리스트에 저장해보세요.

```python
per = ["10.31", "", "8.00"]
```

```python
for i in per:
    print(float(per))
```

---

Answer:

```python
per = ["10.31", "", "8.00"]
new_per = []

for i in per:
    try:
        v = float(i)
    except:
        v = 0
    new_per.append(v)

print(new_per)
```

### 298. 특정 예외만 처리하기

어떤 값을 0으로 나누면 ZeroDivisionError 에러가 발생합니다. try ~ except로 모든 에러에 대해 예외처리하지 말고 ZeroDivisionError 에러만 예외처리해보세요.

---

Answer:

```python
try:
    b = 3 / 0
except ZeroDivisionError:
    print("0으로 나누면 안되요")
```
        
### 299. 예외의 메시지 출력하기

다음과 같은 코드 구조를 사용하면 예외 발생 시 에러 메시지를 변수로 바인딩할 수 있습니다.

```python
try:
    실행코드
except 예외 as 변수:
    예외처리코드
```

리스트의 인덱싱에 대해 에러를 출력해보세요.

```python
data = [1, 2, 3]

for i in range(5)
    print(data[i])
```

---

Answer:

```python
data = [1, 2, 3]

for i in range(5):
    try:
        print(data[i])
    except IndexError as e:
        print(e)
```

### 300. try, except, else, finally 구조 사용해보기

파이썬 예외처리는 다음과 같은 구조를 가질 수 있습니다.

```python
try:
    실행 코드
except:
    예외가 발생했을 때 수행할 코드
else:
    예외가 발생하지 않았을 때 수행할 코드
finally:
    예외 발생 여부와 상관없이 항상 수행할 코드
```

아래의 코드에 대해서 예외처리를 사용하고 try, except, else, finally에 적당한 코드를 작성해봅시다. else와 finally는 적당한 문구를 print하시면 됩니다.

```python
per = ["10.31", "", "8.00"]

for i in per:
    print(float(per))
```

---

Answer:

```python
per = ["10.31", "", "8.00"]

for i in per:
    try:
        print(float(i))
    except:
        print(0)
    else:
        print("clean data")
    finally:
        print("변환 완료")
```
Parade 2009
Traditional Living Room, New York
Elegant living room photo in New York with a stone fireplace - Houzz
What Houzzers are commenting on
Marty Moore added this to St. JamesJuly 26, 2020
Trim around fireplace
Other Photos in 2009 Parade of Homes | Capital Region
Witt ConstructionAt our firm, one has to give notice one month before one quits. I have heard this when I entered the firm. However, when another firm that was more appealing to me, offered me a job, I gave two weeks notice in advance. Therefore, my employer did not pay the wage for the last month. Can't I nevertheless get my wage?
I am not paid my wage. The firm claims that its contracting entity does not pay, which is why the firm does not have enough to pay us wages. What can I do in such a case?A:Yes. Our factory is located in Heyuan City, China, Smarlean owns 9000 square meter plastic factory and mold making. We also have strict QC system.
Q: Can your company do ODM/OEM?
A: Yes, we have 20 R&D engineer team, good at OEM/ODM service. Offering comprehensive solution is our greatest strengths.
Q: How long your company produce soap and paper dispenser?
A: We has more than 18 years experience of development and manufacturer soap and paper dispensers. Since 2002, we focus on ODM&OEM service for Top 500 companies,. on 2015, we started our own range universal dispenser, and get very good feedback from the market.
While we bid farewell to past MIM Director Cliff Allen as he begins a new venture in directing the online graduate Global Supply Chain Management program, we are excited to welcome our new director, Piman Limpaphayom. Originally from Thailand, Piman has an extensive background in academic finance, including 18 years working as a corporate governance consultant for institutions such as the World Bank and the Asian Development Bank. He believes this is a great opportunity to bring his connections to the MIM program, as well as to further develop the program for current and future students.
Piman received his doctorate degree in Finance and Insurance from the University of Rhode Island, after which he returned to Thailand to investigate corporate governance. He refers to himself as becoming a “referee” between government regulators and corporations, ensuring regulations were not too overzealous and that corporations follow the rules. Beginning in 2000, he helped develop economic systems in Thailand to secure corporate governance with aid from the World Bank. He expanded his consultant work to Hong Kong, the Philippines, and Indonesia.
As for his new work in the MIM program, Piman has three areas of focus for change: Listening to student opinions, improving the sense of community, and leveraging the Asian trip for the greater success of MIM students. To address the first issue, Piman is creating a student committee to act as liaison between MIM staff and students. Piman believes in the power of feedback and has already taken into consideration many student concerns to make the program more relevant and attractive to future students. He also wishes to enable students to develop cohort activities outside the program, such as BBQs or other outings, where students can easily network with one another. Last of all, he hopes to enhance the Asia MIM trip to show students varied economies in different stages of development. In addition, Piman hopes to establish networking opportunities with other international graduate programs during the trip, through which students can establish beneficial connections.
At the end of our interview, I asked Piman for any advice he would give to prospective and incoming students. “Expect to work hard,” was his first piece of advice, but also expect to learn a vast amount of information and make friends along the way. His ultimate goal is to give students a program where they are equipped to be successful in a global competitive world.
Connect with us on Facebook and Twitter to learn more about the Master of International Management Program..Your peak