D
D
Dmitry Khakrin2021-08-05 10:35:33
Python
Dmitry Khakrin, 2021-08-05 10:35:33

I run the program, as a result there are no errors, as a result such a window, what is the problem?

vibor_typ=('Тип фигуры ?')
if vibor_typ == '2':
  vibor1=input('Стороны равны ? -Да , -Нет')
  if vibor1 == 'Нет' or 'нет':
    vibor2=input('У всех противоположных сторон равная длина ?')
    if vibor2 == 'Нет' or 'нет':
      print('Заданная фигура -    Прямоугольник')
      if vibor2 == 'Да' or 'да':
        vibor3=input('Две стороны параллельны ?')
      if vibor3 == 'Да' or 'да':
        print('Это трапеция')
      if vibor3 == 'Нет' or 'нет':
        print('По заданным параметрам фигура не найдена')
  if vibor1 == 'Да' or 'да':
      figur1=input('Все углы равны 90° ? ')
      if figur1 == 'Нет' or 'нет':
      	print('Заданная фигура - ромб')
      if figur1 == 'Да' or 'да':
      	print('Заданная фигура - квадрат')

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Gornostaev, 2021-08-05
@degrater

Everything is logical, the vibor_typ variable at startup contains the string 'Shape type?', this string is not equal to the string "2", the conditional expression is not entered, the script ends.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question