- #1
mathmari
Gold Member
MHB
- 5,049
- 7
Hey!
Construct a class named Vector that expresses the meaning of the vector of numbers. The initialization function, __init__ will take as a argument a tuple corresponding to the vector. This tuple will be stored in the variable named coord. Also, __init__ will calculate the Euclidean measure of the vector and store it in the variable norm2. How do we write the tuple as an argument of the function?
Do we write just :
? Or do we have to the elements there and insert these into the tuple?
:unsure:
Construct a class named Vector that expresses the meaning of the vector of numbers. The initialization function, __init__ will take as a argument a tuple corresponding to the vector. This tuple will be stored in the variable named coord. Also, __init__ will calculate the Euclidean measure of the vector and store it in the variable norm2. How do we write the tuple as an argument of the function?
Do we write just :
Code:
class Vector :
def __init__(self, coord):
pass
? Or do we have to the elements there and insert these into the tuple?
:unsure: