From c2d23c8d3ddb68ef9facec02ac174626b3265606 Mon Sep 17 00:00:00 2001 From: Reem Date: Wed, 18 Feb 2026 14:16:44 +0300 Subject: [PATCH] The lob lab has been completed --- q4.2.py | 7 +++++++ q43.py | 14 ++++++++++++++ q44.py | 8 ++++++++ 3 files changed, 29 insertions(+) create mode 100644 q4.2.py create mode 100644 q43.py create mode 100644 q44.py diff --git a/q4.2.py b/q4.2.py new file mode 100644 index 0000000..1f9bf75 --- /dev/null +++ b/q4.2.py @@ -0,0 +1,7 @@ +number=range(45,210) +for num in number: + if num==100: + continue + if num==205: + break + print(num) \ No newline at end of file diff --git a/q43.py b/q43.py new file mode 100644 index 0000000..de3fd47 --- /dev/null +++ b/q43.py @@ -0,0 +1,14 @@ + +while True: + user_answer = int(input("What is the product of 7 * 24 ? ")) + if user_answer == 168: + print("You answered this Question correctly") + break + else: + print("Your Answer is wrong try again..") + + + + + + diff --git a/q44.py b/q44.py new file mode 100644 index 0000000..675e94e --- /dev/null +++ b/q44.py @@ -0,0 +1,8 @@ +n= int(input("Enter a positive integer: ")) +sum = 0 + +for x in range(1, n + 1): + if x % 2 == 0: + sum += x + +print(f"The sum of even numbers between 1 and {n} is {sum}.") \ No newline at end of file