<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 Excercises Electric Machinery Fundamentals
Chapter 6
Problem 6-10
Step1:  Description
A three-phase 60-Hz two-pole induction motor runs at a no-load speed of 3580 r/min and a full-load speed of 3440 r/min. 
Calculate the slip and the electrical frequency of the rotor at no-load and full-load conditions. 
What is the speed regulation of this motor?
Step2:  SOLUTION
The synchronous speed of this machine is
Step3:  The slip and electrical frequency at no-load conditions is
Step4:  $$f_\text{r,nl} = sf_e$$
Step5:  The slip and electrical frequency at full load conditions is
Step6:  $$f_\text{r,fl} = sf_e$$
Step7:  The speed regulation is
<ASSISTANT_TASK:>
Python Code:
%pylab notebook
Explanation: Excercises Electric Machinery Fundamentals
Chapter 6
Problem 6-10
End of explanation
fe = 60     # [Hz]
p  = 2      
n_nl = 3580 # [r/min]
n_fl = 3440 # [r/min]
Explanation: Description
A three-phase 60-Hz two-pole induction motor runs at a no-load speed of 3580 r/min and a full-load speed of 3440 r/min. 
Calculate the slip and the electrical frequency of the rotor at no-load and full-load conditions. 
What is the speed regulation of this motor?
End of explanation
n_sync = 120*fe / p
print('n_sync = {:.0f} r/min'.format(n_sync))
Explanation: SOLUTION
The synchronous speed of this machine is:
$$n_\text{sync} = \frac{120f_{se}}{p}$$
End of explanation
s_nl = (n_sync - n_nl) / n_sync 
print('''
s_nl = {:.2f} %
============='''.format(s_nl*100))
Explanation: The slip and electrical frequency at no-load conditions is:
$$S_\text{nl} = \frac{n_\text{sync} - n_\text{nl}}{n_\text{sync}} \cdot 100\%$$
End of explanation
f_rnl = s_nl * fe
print('''
f_rnl = {:.2f} Hz
==============='''.format(f_rnl))
Explanation: $$f_\text{r,nl} = sf_e$$
End of explanation
s_fl = (n_sync - n_fl) / n_sync 
print('''
s_fl = {:.2f} %
============='''.format(s_fl*100))
Explanation: The slip and electrical frequency at full load conditions is:
$$ S_\text{fl} = \frac{n_\text{sync} - n_\text{fl}}{n_\text{sync}} \cdot 100\%$$
End of explanation
f_rfl = s_fl * fe
print('''
f_rfl = {:.2f} Hz
==============='''.format(f_rfl))
Explanation: $$f_\text{r,fl} = sf_e$$
End of explanation
SR = (n_nl - n_fl) / n_fl
print('''
SR = {:.2f} %
==========='''.format(SR*100))
Explanation: The speed regulation is:
$$SR = \frac{n_\text{nl} - n_\text{fl}}{n_\text{fl}} \cdot 100\%$$
End of explanation
<END_TASK>