목록파이썬 과제 도와주기 일지 (13)
PythonHolic

print('심판 점수 입력(시험의 점수는 0~10 사이의 점수를 입력하세요') score = [] for i in range(7): score.append(int(input("점수 입력(0~10): "))) score.remove(max(score)) score.remove(min(score)) print('%.2f'%(sum(score)/5))

n = int(input()) temp = "" for i in range(len(str(n))): if i==0: temp += str(n%10) elif i>0 and i

lst = list(input("리스트가 안에 들어갈 숫자를 입력하시오 >>> ")) splitter = int(input("나눌 숫자를 입력하시오 >>> ")) result = [[],[]] cnt = len(lst) def recSplit(a,b,count): if count == 0: return result if (len(lst)-count)=(len(lst)-b): result[1] += a[len(lst)-count] count -=1 recSplit(lst,splitter,count) def main(): recSplit(lst,splitter,cnt) main() print(result)

total = 0 while True: who=input('어버이날 선물을 위하여 저축하는 사람은? (I/bro): ') money=int(input('저축하는 액수를 입력하세요: ')) if who == 'I' or who == 'i': print('내가', money, '원 저축합니다!') total += money else: print('동생이', money, '원 저축합니다!') total += money print('현재까지 모은 액수는', total, '원입니다.') if total = 100000: print("축하합니다 ! 목표 금액을 채우셨습니다!") break

여기서 체크 표시는 "α" 입니다 aim = int(input("목표로 하는 금액 >>> ")) total = 0 day = 0 while True: count=0 alpha = 0 if total >> ")) for i in range(1,m+1): if m % i==0: count+=1 if count>=50: alpha = m elif count=30: alpha = 10000 elif count0: for i in range(1,total+1): if total % i==0: count+=1 if count>=50: alpha = total elif count=30: alpha = 10000 elif count aim: prin..

NUM_STUDENT = 8 Score_SW = [0] * NUM_STUDENT for num in range(NUM_STUDENT)): Score_SW[num] = int(input('Score %d = ' % (num+1))) for j in range( len(Score_SW)- 1 ): for k in range( j+1,len(Score_SW) ): if ( Score_SW[k] > Score_SW[j]) : tmp = Score_SW[j] Score_SW[j] = Score_SW[k] Score_SW[k] = tmp for j in range(NUM_STUDENT): print("%3d" % Score_SW[j])

def minje(): n1 = int(input("")) n2 = int(input("")) while True: if n1 > n2: print("n1은 항상 n2 보다 작아야 합니다 ") n1 = int(input()) n2 = int(input()) else: break count = 0 a = [] a.append(n1) while True: if a[count] >= n1 and a[count] 0: a.append(a[count]*2+1) count +=1 elif a[count] n2: del a[count-1] print("\n[ 출 력 ]") for i in range(len(a)): print(a[i]) minje()

lst = ['asdff','asgzxcvcvc','dsafqwdfwef','zxveqfgqergav','zdxfasfdfqwfd','xzveafvsad'] temp_lst =[] index = [] for i in range(len(lst)): temp_lst.append(len(lst[i])) max_lst = max(temp_lst) min_lst = min(temp_lst) index.append(temp_lst.index(max_lst)) index.append(temp_lst.index(min_lst)) print("최대 길이 문자열은 ",lst[index[0]]) print("최소 길이 문자열은 ",lst[index[1]])