Question: Write a Python script, h 0 1 0 1 . py , that writes the variables drafted below and print them on the command line.

Write a Python script, h0101.py, that writes the variables drafted below
and print them on the command line. Tip: type help("math")and/or help("cmath") in the com-
mand line and learn more about the particularities of Pythons math and complex math libraries.
(a) a =10
(b) b =2.5 x 1023
(c) c =2+3i, where i is the square root of -1. Tip: Import the cmath library to operate complex numbers.
Type help("cmath") in the command line for further assistance.
(d) d = ej2p/3, where j is the square root of -1 and e is the Eulers number. Tip: import the math library to re-
trieve the math.pi (number 3.141592...) constant. Import the cmath library to operate
cmath.exp(): exponentials of complex numbers. Type help("math.pi") and
help("cmath.exp") in the command line for further assistance.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!