diff --git a/evenSum.py b/evenSum.py new file mode 100644 index 0000000..55ee013 --- /dev/null +++ b/evenSum.py @@ -0,0 +1,9 @@ + +n =int( input("please provide a number:")) +sum = 0 +for i in range(1,n+1): + if i % 2 == 0: + sum += i + + +print(f"sum of all previous even numbers between {1} and {n} is:{sum}") \ No newline at end of file diff --git a/loop-lab.py b/loop-lab.py new file mode 100644 index 0000000..b366f60 --- /dev/null +++ b/loop-lab.py @@ -0,0 +1,15 @@ + + +for i in range (45,250): + if i == 100: + continue + elif i == 205: + break + print(f"element currently at: {i}") + +while int(input("what is 7 * 24? ")) != 168: + print("Your Answer is wrong try again..\n") +print("You answered this Question correctly") + + +