hbui
2024-07-15 f736ce6b3b90d11bac59244c89f54c8528bd27d2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#! /usr/bin/env python
import sys
import math
 
 
x = float(sys.argv[1])
y = float(sys.argv[2])
 
z = complex(x, y)
radius = abs(z)
theta = math.atan2(y, x)
theta_degree = math.degrees(theta)
 
print("Kartesische Koordinate des Punktes:")
print(f"   x = {x}; y = {y}")
print(f"   r = {radius:.3f}; theta = {theta_degree:.3f}°")