import random[br]a=3; [br]b=8;[br]x = random.randint(1, 10)[br][br]if x == a:[br] print("x == a")[br]else:[br] print("x != a")[br][br]if x != a:[br] print("x != a")[br]else:[br] print("x == a")[br][br]if x > a:[br] print("x > a")[br]else:[br] print("x <= a")[br][br]if x <= a:[br] print("x <= a")[br]else:[br] print("x > a")[br][br]if x >= a:[br] print("x >= a")[br]else:[br] print("x < a")[br][br]if x < a:[br] print("x < a")[br]else:[br] print("x >= a")[br][br]######################[br]#Conversión de Negaciones[br]#De conjunción A disyunción [br]#por Ley de Morgan[br][br]if x > a and x < b:[br] print("x > a and x < b")[br]else:[br] print("x <= a or x >= b")[br][br]if x >= a and x <= b:[br] print("x >= a and x <= b")[br]else:[br] print("x < a or x > b")[br][br]if x >= a and x < b:[br] print("x >= a and x < b")[br]else:[br] print("x < a or x >= b")[br][br]if x > a and x <= b:[br] print("x > a and x <= b")[br]else:[br] print("x <= a or x> b")[br][br]#######################[br]#Conversión de Negaciones[br]#De disyunción A conjunción [br]#por Ley de Morgan[br][br]if x <= a or x>= b:[br] print("x <= a or x>= b")[br]else:[br] print("x > a and x < b")[br][br]if x < a or x > b:[br] print("x < a or x > b")[br]else:[br] print("x >= a and x <= b")[br][br]if x < a or x >= b:[br] print("x < a or x >= b")[br]else:[br] print("x >= a and x < b")[br][br]if x <= a or x > b:[br] print("x <= a or x > b")[br]else:[br] print("x > a and x <= b")
import random[br]a=3; [br]b=8;[br]x = random.randint(1, 10)[br][br]if x == a:[br] print(f"{x:0.0f} == {a:0.0f}")[br]else:[br] print(f"{x:0.0f} != {a:0.0f}")[br][br]if x != a:[br] print(f"{x:0.0f} != {a:0.0f}")[br]else:[br] print(f"{x:0.0f} == {a:0.0f}")[br][br]if x > a:[br] print(f"{x:0.0f} > {a:0.0f}")[br]else:[br] print(f"{x:0.0f} <= {a:0.0f}")[br][br]if x <= a:[br] print(f"{x:0.0f} <= {a:0.0f}")[br]else:[br] print(f"{x:0.0f} > {a:0.0f}")[br][br]if x >= a:[br] print(f"{x:0.0f} >= {a:0.0f}")[br]else:[br] print(f"{x:0.0f} < {a:0.0f}")[br][br]if x < a:[br] print(f"{x:0.0f} < {a:0.0f}")[br]else:[br] print(f"{x:0.0f} >= {a:0.0f}")[br][br]######################[br]#Conversión de Negaciones[br]#De conjunción A disyunción [br]#por Ley de Morgan[br][br]if x > a and x < b:[br] print(f"{x:0.0f} > {a:0.0f} and {x:0.0f} < {b:0.0f}")[br]else:[br] print(f"{x:0.0f} <= {a:0.0f} or {x:0.0f} >= {b:0.0f}")[br][br]if x >= a and x <= b:[br] print(f"{x:0.0f} >= {a:0.0f} and {x:0.0f} <= {b:0.0f}")[br]else:[br] print(f"{x:0.0f} < {a:0.0f} or {x:0.0f} > {b:0.0f}")[br][br]if x >= a and x < b:[br] print(f"{x:0.0f} >= {a:0.0f} and {x:0.0f} < {b:0.0f}")[br]else:[br] print(f"{x:0.0f} < {a:0.0f} or {x:0.0f} >= {b:0.0f}")[br][br]if x > a and x <= b:[br] print(f"{x:0.0f} > {a:0.0f} and {x:0.0f} <= {b:0.0f}")[br]else:[br] print(f"{x:0.0f} <= {a:0.0f} or {x:0.0f} > {b:0.0f}")[br][br]#######################[br]#Conversión de Negaciones[br]#De disyunción A conjunción [br]#por Ley de Morgan[br][br]if x <= a or x>= b:[br] print(f"{x:0.0f} <= {a:0.0f} or {x:0.0f} >= {b:0.0f}")[br]else:[br] print(f"{x:0.0f} > {a:0.0f} and {x:0.0f} < {b:0.0f}")[br][br]if x < a or x > b:[br] print(f"{x:0.0f} < {a:0.0f} or {x:0.0f} > {b:0.0f}")[br]else:[br] print(f"{x:0.0f} >= {a:0.0f} and {x:0.0f} <= {b:0.0f}")[br][br]if x < a or x >= b:[br] print(f"{x:0.0f} < {a:0.0f} or {x:0.0f} >= {b:0.0f}")[br]else:[br] print(f"{x:0.0f} >= {a:0.0f} and {x:0.0f} < {b:0.0f}")[br][br]if x <= a or x > b:[br] print(f"{x:0.0f} <= {a:0.0f} or {x:0.0f} > {b:0.0f}")[br]else:[br] print(f"{x:0.0f} > {a:0.0f} and {x:0.0f} <= {b:0.0f}")