Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

here is a pyhton 3 code it gives me a name error for math. how do i fix it Entre el valor de la inductancia

here is a pyhton 3 code it gives me a name error for math. how do i fix it image text in transcribed
image text in transcribed
image text in transcribed
Entre el valor de la inductancia en henrios = 0.15 Entre el valor del capacitor en micro faradios = 100 Traceback (most recent call last) : File "/home/main.py", line 15, in xl=2 * math.pi * frequencia * inductor NameError: name 'math' is not defined ...Program finished with exit code 1 Press ENTER to exit console. print ("Entre la magnitud de la fuente de voltage = ") vfuente = float ( input ()) print("Entre el angulo del voltaje de la fuente = ") angVoltaje = float ( input ()) print("Entre el valor de la frequencia en hz=" ) frequencia = float ( input ()) print("Entre resistencia en ohas =") resistencia = float ( input ()) print("Entre el valor de la inductancia en henrios =") inductor = float ( input ()) print("Entre el valor del capacitor en micro faradios =") capacitor = floit ( input ()) from math import * xl =2 * math. pi * frequencia * inductor xx=1.0/(2 * math.pi * frequencia capacitor * 10(6)) impedancia =sqrt( resistencia 2+(x1+xc)=2) angimpedancia =atan((x1+xc)/ resistencia )180/ wath. corriente = vfuente / impedancia angCorriente =1 * angimpedancia vr1 = corriente resistencia vrlang = angCorriente vl= corriente xl vlang = angCorriente +90 vc= corriente xc vl = corriente xxl vlang = angCorriente +90 vc= corriente xc vcang = angCorriente -90 pvr =vr1 corriente cos(vr1 ang - angCorriente) qvr=vr1 corriente * sin(vr1 ang - angCorriente) pxl = vl * corriente * sin(vr1ang - angCorriente) qxl=vl corriente 1 pxc =vc corriente sin(vr1 ang - angCorriente) qxc=vc corriente 1 s=sqrt(pvr2+(qc+q1)2) powerFactor =atan(pr/(qxc+qx1))180/ math.pi print("XI ="+str(x1)+"Xc="+str(xc)) print("Impedancia ="+stn( impedancia )+" angulo ="+str (angimpedancia) ) print ("Corriente ="+ str (corriente) +" angulo ="+str (angCorriente)) print("vr = " + str(vr1) + " angulo = " + str (angCorriente)) print ("v1 ="+stn(v1)+" angulo ="+str( vlang )) print ("vc ="+str(vc)+" angulo ="+str( vcang )) print("Pvr ="+str(pvr)+"Qvr="+str(qvr)) print("Pxl ="+str(p1)+"Q1="+str(q1)) print("Pxc ="+str(pxc)+"Qc="+str(qc)) print ("s ="+str(s)+" PF ="+str (powerFactor))

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Introductory Relational Database Design For Business With Microsoft Access

Authors: Jonathan Eckstein, Bonnie R. Schultz

1st Edition

1119329418, 978-1119329411

More Books

Students also viewed these Databases questions

Question

b. What groups were most represented? Why do you think this is so?

Answered: 1 week ago