#Node Voltage
v=int(input("enter the value of voltage"))
r1=int(input("enter the value of r1"))
r2=int(input("enter the value of r2"))
r3=int(input("enter the value of r3"))
r4=int(input("enter the value of r4"))
from sympy import symbols,Eq,solve
v=symbols("v")
eq1=(v-10)/3+ v/4+ v/11
vn=solve(eq1)
print("the node volgate is={:5.3f}" .format(440/89))

#Branch Current
v=int(input("enter the value of voltage"))
r1=int(input("enter the value of r1"))
r2=int(input("enter the value of r2"))
r3=int(input("enter the value of r3"))
r4=int(input("enter the value of r4"))
from sympy import symbols,Eq,solve
I_1,I_2=symbols('I_1,I_2')
eq1=Eq(10+4*I_1-7*I_2,0)
eq2=Eq(15*I_1-4*I_2,0)
solve((eq1,eq2),(I_1,I_2))
print("branch currents")
print("the current flowing through 3Ω resistor is={:5.3f}A".format(150/89))
print("the current flowing through 5Ω and 6Ω resistor is={:5.3f}A".format(40/89))
print("the current flowing through 4Ω resistor is={:5.3f}A".format((150/89)-(40/89)))