diff --git a/SumEvenNumbers.py b/SumEvenNumbers.py new file mode 100644 index 0000000..8c39c57 --- /dev/null +++ b/SumEvenNumbers.py @@ -0,0 +1,8 @@ +num=int(input("Enter a positive integer: ")) + +total=0 +for i in range(0,num+1,2): + total+=i + + +print(f"The sum of even numbers between 1 and {num} is: {total}") \ No newline at end of file diff --git a/Task1.py b/Task1.py new file mode 100644 index 0000000..16d4b7d --- /dev/null +++ b/Task1.py @@ -0,0 +1,6 @@ +for num in range(45,210): + if num ==100: + continue + elif num == 205: + break + print(num) diff --git a/Task2.py b/Task2.py new file mode 100644 index 0000000..0fbb7d9 --- /dev/null +++ b/Task2.py @@ -0,0 +1,11 @@ +ansure=input("what is the product of 7 * 24 ?\n") + +while ansure != "168": + print(f"Your Answer {ansure} is wrong try again..") + ansure=input("what is the product of 7 * 24 ?\n") + +print("You answered correctly this Question") + + + +