Python/Lab_2/Task_3.py

13 lines
323 B
Python
Raw Normal View History

2024-03-09 17:38:18 +02:00
try:
a = int(input("Введіть число a: "))
b = int(input("Введіть число b: "))
if a < b:
numbers = [i for i in range(a, b+1)]
print(*numbers)
print(len(numbers))
else:
print("Error ocured: A>B")
except Exception as err:
print("Error ocured:", err)