<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 Answer the following questions in Python. Do all calculations in Python
Print $\pi/2$ with three digits of precision. Use the pi constant from the math module
Step1:  Given a variable called angle, print out the sine of it like so
Step2:  Using string formatting show the decimal and binary representation of the number 34. Your format function should only take one argument, the number 34.
Step3:  Using a for loop, print the integers from 0 to 8 in binary such that each line is right-aligned.
<ASSISTANT_TASK:>
Python Code:
from math import pi
print('{:.3}'.format(pi / 2))
Explanation: Answer the following questions in Python. Do all calculations in Python
Print $\pi/2$ with three digits of precision. Use the pi constant from the math module
End of explanation
from math import *
x = 1.2
print('The sine of {:.2} radians is {:.2}'.format(x, sin(x)))
Explanation: Given a variable called angle, print out the sine of it like so:
text
The sine of 1.2 radians is 0.932
Make sure that your code uses a variable, not literally 1.2 radians. Make your precision match what is shown above.
End of explanation
print('binary: {0:b}, decimal: {0:}'.format(34))
Explanation: Using string formatting show the decimal and binary representation of the number 34. Your format function should only take one argument, the number 34.
End of explanation
for i in range(9):
    print('{:5b}'.format(i))
Explanation: Using a for loop, print the integers from 0 to 8 in binary such that each line is right-aligned.
End of explanation
<END_TASK>