The multiplication_table function prints the results of a number passed to it multiplied by 1 through 5. An additional requirement is that the result is not to exceed 25, which is done with the break statement. Fill in the blanks to complete the function to satisfy these conditions.
Answers
Answered by
4
Answer:
plz give the blanks
Explanation:
hope this will help you plz follow me and add the answer to Brainliest answers
Answered by
7
Answer:
def multiplication_table(number):
# Initialize the starting point of the multiplication table
multiplier = 1
# Only want to loop through 5
while multiplier <= 5:
result = number * multiplier
# What is the additional condition to exit out of the loop?
if result > 25 :
break
print(str(number) + "x" + str(multiplier) + "=" + str(result))
# Increment the variable for the loop
multiplier += 1
Explanation:
so the result will be get the multiplier number so number x multipiler
then if result is more then 25 then it will break
and multipiler will be increase
Similar questions