Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Need python solution to this with the stated requirement. Write codes that will take in 2 integer values and display the bigger of the 2
Need python solution to this with the stated requirement.
Write codes that will take in 2 integer values and display the bigger of the 2 numbers. The program should also display relevant message when the 2 numbers are equal. a) Write the function getInput as follows: The function takes in a String parameter that will be used as the input dialog prompt, e.g. "1st:" and "2nd:". It returns an integer value corresponding to the user input. b) Write a function findMax that takes in 2 integer values num1 and num2. It compares which number is bigger and returns the bigger number's value. c) In your main code, invoke getInput("1st:") and getInput("2nd:") to get the values of num1 and num2. Invoke findMax and display the string returned. Please note submission is just the py source file. Sample Output 1: 1st:18 2nd:15 18 Sample Output 2: 1st:20 2nd:20 20Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started