diff --git a/Bonus.py b/Bonus.py new file mode 100644 index 0000000..f99b599 --- /dev/null +++ b/Bonus.py @@ -0,0 +1,10 @@ +n = 0 +while n < 1: + n = int(input("Enter a positive integer: ")) + +j = 0 +for i in range(2,n+1,2): + j = i+j + +print(f"The sum of even numbers between 1 and {n} is {j}.") + \ No newline at end of file diff --git a/first_task.py b/first_task.py new file mode 100644 index 0000000..1b05f5d --- /dev/null +++ b/first_task.py @@ -0,0 +1,9 @@ +rangeloop = range(45,210) + +for i in rangeloop: + if i == 100: + continue + elif i == 205: + break + else: + print(i) diff --git a/second_task.py b/second_task.py new file mode 100644 index 0000000..6bd34d4 --- /dev/null +++ b/second_task.py @@ -0,0 +1,7 @@ +product = None +while product != 168: + product:int = int(input("what is the product of 7 * 27 ? ")) + if product != 168: + print("Your Answer is wrong try again") + +print("You answered this Question correctly") \ No newline at end of file