+ 1

Python question

Hey, guys, I need to write a program with the main function and a custom, void function named show_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. EXAMPLE OUTPUT 1 3 is larger than 1 by 2 EXAMPLE OUTPUT 2 The integers are equal, both are 3

25th Sep 2017, 9:27 PM
Alejandro Ariza
2 Answers
0
Void!? Hmmm never thought we need. This is too simple to have a main
26th Sep 2017, 1:16 AM
👑 Prometheus 🇾🇬
👑 Prometheus 🇾🇬 - avatar
26th Sep 2017, 1:19 AM
👑 Prometheus 🇾🇬
👑 Prometheus 🇾🇬 - avatar