Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # find the divisor
- # marks = [80, 42, 56]
- # def check_grade(i):
- # if 80<=i<=100:
- # print('A+')
- # elif 75 <= i < 80:
- # print('A')
- # elif 70 <= i < 74:
- # print('A-')
- # elif 65 <= i < 69:
- # print('B+')
- # elif 60 <= i < 64:
- # print('B')
- # elif 55 <= i < 59:
- # print('B-')
- # elif 50 <= i < 54:
- # print('C')
- # elif 45 <= i < 49:
- # print('D')
- # elif 0 <= i < 44:
- # print('F')
- # for i in marks:
- # check_grade(i)
- # digital triangle:
- # x = 1
- # y = 4
- # for i in range(1,y+1):
- # for j in range(1,i+1):
- # print(x, end=' ')
- # print('\n')
- # divisor
- # -------------
- x = [6, 15, 23]
- count = 0
- def check(i):
- for j in range(1, i + 1):
- if i % j == 0:
- print(j, end=' ')
- for i in x:
- count += 1
- print('case ' ,count, ': ', end=' ')
- check(i)
- print('\n')
Advertisement
Add Comment
Please, Sign In to add comment