diff --git a/Week-2/mathquiz.py b/Week-2/mathquiz.py index b4c4e45..775cf29 100644 --- a/Week-2/mathquiz.py +++ b/Week-2/mathquiz.py @@ -38,3 +38,27 @@ else: print(f"Wrong") + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Week-2/mathquiz/challenge5.py b/Week-2/mathquiz/challenge5.py new file mode 100644 index 0000000..939ea7e --- /dev/null +++ b/Week-2/mathquiz/challenge5.py @@ -0,0 +1,10 @@ +from random import randint +#Challenges5 + +number_one = randint(1,10) +number_two = randint(1,10) +answer = int(input(f"What is {number_one} times {number_two} ?\n" * 2)) +if number_one * number_two == answer: + print(f"Your answer {answer} is correct!!") +else: + print(f"Wrong the correct answer is {number_one * number_two}") diff --git a/Week-2/mathquiz/challenge6.py b/Week-2/mathquiz/challenge6.py new file mode 100644 index 0000000..a35e06d --- /dev/null +++ b/Week-2/mathquiz/challenge6.py @@ -0,0 +1,5 @@ +userInput = int(input("Enter a valid number :")) +if userInput > 100: + print(" Great number ") + + diff --git a/Week-2/mathquiz/challenge7.py b/Week-2/mathquiz/challenge7.py new file mode 100644 index 0000000..e18399d --- /dev/null +++ b/Week-2/mathquiz/challenge7.py @@ -0,0 +1,5 @@ +userInput = int(input("Enter a valid number :")) +if userInput == 100: + print(" Tie ") + + diff --git a/Week-2/mathquiz/challenge8.py b/Week-2/mathquiz/challenge8.py new file mode 100644 index 0000000..9e52f6c --- /dev/null +++ b/Week-2/mathquiz/challenge8.py @@ -0,0 +1,10 @@ +from random import randint +#Challenges5 + +number_one = randint(1,10) +number_two = randint(1,10) +answer = int(input(f"What is {number_one} times {number_two} ?\n")) +if number_one * number_two == answer: + print("yes") +else: + print("No!!")