티스토리 뷰
#BMI Example
height = float(input("Height: "))
weight = int(input("Weight: "))
if height > 3:
raise ValueError("Human Height should not be over 3 meters.")
bmi = weight / height ** 2
print(bmi)
----------------------------------------
Height: 43
Weight: 65
Traceback (most recent call last):
File "C:\Users\kiost\PycharmProjects\pythonProject\Days30_HandlingErrorsandExceptions\main.py", line 55, in <module>
raise ValueError("Human Height should not be over 3 meters.")
ValueError: Human Height should not be over 3 meters.
Process finished with exit code 1
'Test > Python(20220101~)' 카테고리의 다른 글
NATO 음성 알파벳 예제의 예외처리 (0) | 2022.09.18 |
---|---|
Days30.1 Error Handling Exercise (0) | 2022.09.18 |
Days30. 예외 포착하고 다루기(try,except,else,finally) (0) | 2022.09.14 |
Days29. 웹싸이트 패스워드 관리 (0) | 2022.09.12 |
1차 2급 연습1 (0) | 2022.06.06 |
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- 3par
- dp-2
- insert
- 변수화
- powercli
- set()
- virt-sysprep
- 배열
- dp-1
- exadata
- EXA
- storage
- vmware
- 차집합
- cloud-init
- fromkeys
- dezoomify
- 부동없이
- sysprep
- artandculture
- Join
- 중복제거
- 스토리지
- LIST
- oracle
- powershell
- 정렬
- vmware.powercli
- 대소문자
- 읽어오기
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | |||||
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |
31 |
글 보관함