Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- x=input().split()
- r=float(x[0]) #raza
- a=float(x[1]) #acceleratia
- N=int(x[2]) #nr de linii
- m_p=1.67e-27
- m_e=9.11e-31
- mase=[]
- necunoscute=0
- for i in range(N):
- E=float(input())
- #d = 1.5 * 3.1415 * r * (10e3)
- #v_patrat = 2 * a * d
- #m=2*E/v_patrat
- m=E/(1.5*3.1415*r*10e2*a)
- if m>(m_e-0.1*m_e) and m<(m_e+0.1*m_e):
- m_modificat=m*pow(10,31)
- mase.append("%.6fe-31"%round(m_modificat,6))
- elif m>(m_p-0.1*m_p) and m<(m_p+0.1*m_p):
- m_modificat=m*pow(10,27)
- mase.append("%.6fe-27"%round(m_modificat,6))
- else:
- necunoscute+=1
- for i in mase:
- print(i)
- probabilitate_nescunoscute=necunoscute/N
- print("%.4f"%probabilitate_nescunoscute)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement