Write a python program that contains a main function and a


FOR PYTHON

Write a PYTHON program that contains a main function and a custom, void function namedshow_larger that takes two random integers as parameters.

This function should display which integer is larger and by how much. The difference must be expressed as a positive number if the random integers differ.

If the random integers are the same, show_larger should handle that, too. See example outputs.

In the main function, generate two random integers both in the range from 1 to 5 inclusive, and call show_larger with the integers as arguments.

Solution Preview :

Prepared by a verified Expert
Python Programming: Write a python program that contains a main function and a
Reference No:- TGS02908435

Now Priced at $10 (50% Discount)

Recommended (93%)

Rated (4.5/5)