Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def ch(num):
- if num>=0:
- return '+'
- else:
- return '-'
- n = 7
- out_val = []
- for i in range(1,5):
- x_coef = [1, -1, -1, 1]
- y_coef = [1, 1, -1, -1]
- print(str(i) + " четверть")
- for a in range(1,n+1,2):
- for b in range (1,n+1,2):
- p1 = y_coef[i-1]*a
- p2 = x_coef[i-1]*b
- out = ""
- if p2 == 1:
- out = str(p1) + ch(p2) +'i'
- print(out)
- else:
- out = str(p1) + ch(p2) + str(abs(p2))+'i'
- print(out)
- out_val.append(out)
- print(len(out_val))
- for data in out_val:
- print(data, end=" ")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement