<jupyter_start><jupyter_text>Visualizing Complex Numbers<jupyter_code>%matplotlib inline
import numpy as np 
import matplotlib.pyplot as plt
theta = 2*np.pi/5
r=np.sin(theta)
def getRectCoords(r,theta):
    x= r*np.cos(theta)
    y = r*np.sin(theta)
    yield x
    yield y

def plotComplexNumbers(x,y):
    for i in getRectCoords(r,theta):
        x=i
        y=i+1
        
    return plt.quiver(x,y)
def visualizeComplexNumbers():
    plotComplexNumbers(r,theta)
    
    
    return plt.show()
plt.axhline(0, linestyle="--", color ="black")
plt.axvline(0, linestyle="--",color ="black")

visualizeComplexNumbers()<jupyter_output><empty_output><jupyter_text>Polar Plot<jupyter_code>def getRandTheta():
    theta= np.arange(-2*np.pi,2*np.pi,0.001)
    r= np.sin(theta)
    return(theta,r)
def plotPolar(theta,r):
    theta,r=getRandTheta()
    plt.polar(theta,r)
    plt.plot(theta,r)
    plt.show()
plotPolar(theta,r)<jupyter_output><empty_output><jupyter_text>Matrix Operations  3X3 Matrices Addition<jupyter_code>def matrixInput():
    firstrow=[0,0,0]
    secondrow=[0,0,0]
    thirdrow =[0,0,0]
    for i in range(3):
        text = input().split(' ')
        if i==0:
            firstrow[0]=int(text[0])
            firstrow[1]=int(text[1])
            firstrow[2]=int(text[2])
        elif i==1:
            secondrow[0]=int(text[0])
            secondrow[1]=int(text[1])
            secondrow[2]=int(text[2])
        elif i==2:
            thirdrow[0]=int(text[0])
            thirdrow[1]=int(text[1])
            thirdrow[2]=int(text[2])
    return [firstrow,secondrow,thirdrow]

FirstMatrix =matrixInput()
SecondMatrix=matrixInput()
result =[[0,0,0],
         [0,0,0],
         [0,0,0]]
for i in range(3):
    for a in range(3):
        result[i][a]=FirstMatrix[i][a]+SecondMatrix[i][a]
print(result[0])
print(result[1])
print(result[2])<jupyter_output><empty_output><jupyter_text>Multiply a matrix with a scalar<jupyter_code>scalar=int(input("Write Scalar here:"))
Matrix = matrixInput()
result =[[0,0,0],
         [0,0,0],
         [0,0,0]]
for i in range(3):
    for a in range(3):
        result[i][a]= Matrix[i][a]*scalar
print(result[0])
print(result[1])
print(result[2])<jupyter_output><empty_output><jupyter_text>Multiply two 3X3 Matrices<jupyter_code>firstMatrix=matrixInput()
secondMatrix=matrixInput()
result =np.matmul(firstMatrix,secondMatrix)
print(result[0])
print(result[1])
print(result[2])<jupyter_output><empty_output><jupyter_text>Multiplying two vectors<jupyter_code>def vectorInput():
    vector=input().split(' ')
    vectorNum=[]
    for i in vector:
        vectorNum.append(int(i))
    return vectorNum
vectorOne= vectorInput()
vectorTwo = vectorInput()
result= np.dot(vectorOne,vectorTwo)
print(result)<jupyter_output><empty_output><jupyter_text>Solving linear equations<jupyter_code>def solvingEquations(A,B):
    answer=np.linalg.solve
    return answer
A=matrixInput()
B =int(input("Write free terms here:").split(' '))
result= solvingEquations(A,B)
print(result)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.15777338603425559, 'fraction_numerical': 0.025362318840579712, 'mean_word_length': 4.300174520069808, 'pattern_counts': {'":': 0, '<': 29, '<?xml version=': 0, '>': 29, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '7', 'dir': 'jupyter-structured-clean-dedup', 'id': '428466', 'license': 'MIT', 'n_tokens_mistral': 1161, 'n_tokens_neox': 1138, 'n_words': 182, 'path': '01.Python Crash Course/Python-Crash-Course-Homework/Mathematical Concepts.ipynb', 'repo_name': 'SvetozarMateev/Data-Science', 'size': '3036'}