A range of numbers whether they are fully divisible or not

    In this program, we are asking about 

'how many apples are available to be distributed amongst a range of boys?'

The program is meant to return what number of boys in the range of numbers will equally receive all the available apples.

    

   apples = int(input("How many apples are there: "))

minBoys = int(input("The minimum num of boys are: "))
maxBoys = int(input("The maximum num of boys are: "))

print(f"There are {apples} apples, they are to be divided amongst {minBoys} to {maxBoys} boys.")


for i in range(minBoys, maxBoys+1):
    if apples%i==0:
        print(f"The {apples} apples can be equally divided among the {i} boys.")
    else:
        print(f"The {apples} apples cannot be equally divided among the {i} boys.")

    

Comments

Popular posts from this blog

Quotation marks to wrap an element in HTML

The Basic Structure of a Full-Stack Web App

Unlocking Web Design: A Guide to Mastering CSS Layout Modes