일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- 함수
- 메소드
- xss game
- sql injection
- document
- 백준 파이썬
- lord of sql injection
- 객체
- 백준 알고리즘
- suninatas 풀이
- 조건문
- 파이썬
- jQuery
- 배열
- blind sql injection
- 포인터
- property
- IF문
- burp suite
- 김성엽 대표님
- github
- 자바스크립트
- 사칙연산
- window
- xss game 풀이
- object
- htmlspecialchars
- element 조회
- Pwndbg
- python
Archives
- Today
- Total
power-girl0-0
성적입력받아 최대값과 최소값 차이 구하기 본문
728x90
class Score:
def __init__(self):
self.jumsu=[]
def input_gap(self):
for i in range(0, 10):
num = int(input("성적 입력 : "))
self.jumsu.append(num)
def high_score(self):
high = 0
for base in self.jumsu:
if high < base:
high = base
return high
def low_score(self):
low = self.high_score()
for base in self.jumsu:
if low > base:
low = base
return low
def gap_score(self):
gap = self.high_score() - self.low_score()
return gap
s = Score()
s.input_gap()
print("==> 최대값: %d 최소값: %d 차이값: %d"%(s.high_score(),s.low_score(),s.gap_score()))
728x90
'언어 > Python' 카테고리의 다른 글
[ 15596 ] 정수 N개의 합 (0) | 2021.03.02 |
---|---|
Python 개요 (0) | 2020.12.16 |
하노이의 탑 (0) | 2020.10.13 |
사칙연산 (0) | 2020.10.06 |
사각형의 넓이 구하기 (0) | 2020.10.06 |
Comments