x = input()
y = input()
if x == y and (x == 'синий' or x == 'желтый' or x == 'красный') and (y == 'красный' or y == 'синий' or y == 'желтый'):
print(x)
elif (x == 'красный' or y == 'красный') and (x == 'синий' or y == 'синий'):
print('фиолетовый')
elif (x == 'красный' or y == 'красный') and (x == 'желтый' or y == 'желтый'):
print('оранжевый')
elif (x == 'синий' or y == 'синий') and (x == 'желтый' or y == 'желтый'):
print('зеленый')
elif x != 'синий' and x != 'желтый' and x != 'красный' or y != 'красный' and y != 'синий' and y != 'желтый':
print('ошибка цвета')
я это уже решал на stepik
//з № 1var s,d,f,max:integer;beginRead(s,d,f);if (s > d)and (s > f) thenmax:= selse if (d > s) and (d > f) thenmax:= delse if (f > d) and(f > s) then max:=f;write('max ',max);end.
//з № 2 var x:real; r:integer;beginwrite('Введите число x =');Read(x);if Frac(x)=0 then beginwriteln('x - целое число!');r:=round(x);if ((r mod 2)=0) then writeln('Число четное')else writeln('Число нечетное');endelse writeln('x - дробное число!')end.
//з № 3var a:integer;beginwrite('Введите число а =');Read(a);if (a > 0)and (a <= 5) thena:= a *a*aelse if (a > 5) thena:= a*aelsea:=a;write('a = ',a);end.
Объяснение: