13.7
price = int(input())
discount = input()
if discount == 'Cash3000':
print(price-3000)
elif discount == 'Cash5000':
print(price-5000)
14.7
kor,eng,mat,sci = map(int,input().split())
avg=(kor+eng+mat+sci)/4
if kor<=100 and eng<= 100 and mat<=100 and sci<=100:
if avg>=80:
print('합격')
elif avg<80:
print('불합격')
else:
print('잘못된 점수')
15.4
mywallet = 9000
age = int(input())
if 7<=age<=12:
print(mywallet-650)
elif 13<=age<=18:
print(mywallet-1050)
elif age>=19:
print(mywallet-1250)
else:
print('7세 이하는 입력이 안됩니다')
16.6
num = int(input())
for i in range(1,10):
print(num,'*',i,'=',num*i)
17.6
mywallet = int(input())
while mywallet>0:
print(mywallet)
mywallet-=1350
18.6
start, stop = map(int, input().split())
i=start
while True:
if 10<=i<200 and 10<=stop<200 and i>stop: break
if (i-3)%10 == 0:
i+=1
continue
print(i,end=' ')
i+=1
19.6
n=int(input())
for i in range(1,n+1):
for j in range(n,i,-1):
print(' ', end='')
for k in range(0,i*2-1):
print('*', end='')
print()
20.8
num1,num2 = map(int, input().split())
for i in range(num1,num2+1):
if i%5==0 and i%7!=0:
print('Fizz')
elif i%7==0 and i%5!=0:
print('Buzz')
elif i%5==0 and i%7==0:
print('FizzBuzz')
else:
print(i)
21.6
import turtle as t
n=5
t.shape('turtle')
for i in range(n):
t.forward(100)
t.right(144)
t.forward(100)
t.left(72)
t.mainloop()
'Python' 카테고리의 다른 글
22-24 심사 문제 풀이 (수정중) (0) | 2022.07.28 |
---|---|
리스트에서 모든 20의 인덱스 구하기-반복문 사용X (0) | 2022.07.27 |
숫자 야구 -시도 횟수 줄이기(진행중) (0) | 2022.07.26 |
로또 당첨 프로그램 (0) | 2022.07.26 |
별 찍기 : for문 (0) | 2022.07.26 |