Question: IN PYTHON Write a program that randomly generates two integers between 0 and 100 . You should then check if the difference between these two

IN PYTHON
 IN PYTHON Write a program that randomly generates two integers between
0 and 100 . You should then check if the difference between

Write a program that randomly generates two integers between 0 and 100 . You should then check if the difference between these two numbers is at least 10 and no more than 50 and accordingly print a statement saying "Thisypair of integers is valid" or "This pair of integers is invalid. Whenever the pair is too close together, replace the larger number with two times that number. Whenever the pair is too far apart, replace the larger number with a third of that number rounded UP (not down). Repeat the process until both numbers are valid. Once these numbers are valid proceed as per the following: - Print each of the numbers from the smallest (first number) to the largest (second number). Instead of printing the number do the following whenever the specified conditions are satisfied. 9. Print apple whenever the number is a multiple of 5 6. Print pen whenever the number is a multiple of 7 6. Whenever the number contains a 3 print pineapple - These conditions should stack. So the number 35 should print apple pen pineapple in the same line. Sample run: Two randomly generated integer numbers are 0 and 12 This pair of integers is valid Output for the valid numbers 0,12 0 apple 6 pen 8 9 apple 11 12

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!