fork download
  1. import math;
  2. x=y=float();
  3. A=B=dx=float;
  4. print("Enter value for start A\n");
  5. A=float(input());
  6. print("A=",A,"\n");
  7. print ("Enter value for finish B\n");
  8. B=float(input());
  9. print("B=", B, "\n");
  10. print ("Enter value for step dx\n");
  11. dx=float(input());
  12. print("dx=", dx, "\n");
  13. x=A;
  14. while (x<=B):
  15. y=math.acos((1-x**2)/(1+x**2));
  16. print(f"x={x:10.3f} y={y:10.3f}");
  17. x=x+dx;
Success #stdin #stdout 0.11s 14160KB
stdin
-5
5
0.5
stdout
Enter value for start A

A= -5.0 

Enter value for finish B

B= 5.0 

Enter value for step dx

dx= 0.5 

x=    -5.000 y=     2.747
x=    -4.500 y=     2.704
x=    -4.000 y=     2.652
x=    -3.500 y=     2.585
x=    -3.000 y=     2.498
x=    -2.500 y=     2.381
x=    -2.000 y=     2.214
x=    -1.500 y=     1.966
x=    -1.000 y=     1.571
x=    -0.500 y=     0.927
x=     0.000 y=     0.000
x=     0.500 y=     0.927
x=     1.000 y=     1.571
x=     1.500 y=     1.966
x=     2.000 y=     2.214
x=     2.500 y=     2.381
x=     3.000 y=     2.498
x=     3.500 y=     2.585
x=     4.000 y=     2.652
x=     4.500 y=     2.704
x=     5.000 y=     2.747