Z = float(input('Введи значение переменной Z: '))
X = Z / 2
C = X / 2
Y = C / 2
if X % 2 != 0:
perm_x = X // 2
try:
print('Z', perm_z // perm_z)
except ZeroDivisionError as Z:
print('Z 1')
except NameError as perm_z:
print('Z 2')
if X % 1 > 0.25:
perm_x = X // 2
try:
print('X', perm_x // perm_x)
except ZeroDivisionError as perm_x:
print('X 0')
if C % 1 == 0.75:
print('0')
if Y % 1 > 0.5:
perm_c = C // 2
try:
print('C', perm_c // perm_c)
except ZeroDivisionError as C:
print('C 1.0')
if Y % 1 != 0:
perm_y = Y %1
print('Y', Y - perm_y)
if Y < 1:
try:
print('C', C)
except NameError as C:
print ('Y 0')
else:
print('Y', Y)
try:
print('Переменные: ' 'X:',X, 'C:',C, 'Y:',Y)
except NameError:
print('0')
input()