Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from random import randint as i
- resMax = 50
- factorMax = 15
- class Line:
- x = 0
- y = 0
- z = 0
- a = 0
- result = Line()
- def randomInts(line, rndBounds):
- line.x = i(-rndBounds, rndBounds)
- line.y = i(-rndBounds, rndBounds)
- line.z = i(-rndBounds, rndBounds)
- line.a = line.x * result.x + line.y * result.y + line.z * result.z
- def printMatrixLine(line):
- print(str(line.x) + " " + str(line.y) + " " + str(line.z) + " " + str(line.a))
- def createMatrixLine():
- line = Line()
- randomInts(line, 15)
- printMatrixLine(line)
- randomInts(result, 50)
- createMatrixLine()
- createMatrixLine()
- createMatrixLine()
- input()
- printMatrixLine(result)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement