Computers and Technology, 04.04.2020 08:35 AWFHayami
Write a program that contains a 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.
Answer from: timijebs
A program that contains a main function and a custom, void function named show_larger that takes two random integers as parameters.
Explanation:
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.def main():
value_1=random.randrange(1,6)
value_2=random.rangrange(1,6)
def show_larger():
difference= value_1=-value_2
if value_1 == value_2:
print('The integers are equal, both are' + str(value_1))
Answer from: Quest
pages of a boo
Answer from: Quest
what is your question exactly? when you let me know i will gladly you. : )
Computers and Technology, 23.06.2019 08:00, ionmjnm3041
The managing director of a company sends a christmas greeting to all his employees through the company email. which type of network does he use? he uses an .
Answers: 3
Computers and Technology, 23.06.2019 08:00, seaotter7140
Michael has written an e-mail to his employees that describes a new product special that will be introduced to the customers next week. by taking time to make sure the e-mail is well written, logical, and organized, michael has made sure his message has the characteristics of a) effective communicationb) ineffective communicationc) barriers to communicationd) workplace communication
Answers: 2
Computers and Technology, 23.06.2019 08:00, hernandez09297
What is a scenario where records stored in a computer frequently need to be checked
Answers: 2
Write a program that contains a main function and a custom, void function named show_larger that tak...
Mathematics, 25.06.2019 05:30
History, 25.06.2019 05:30
Mathematics, 25.06.2019 05:30
English, 25.06.2019 05:30