Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

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 20

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Marketing The Ultimate Marketing Tool

Authors: Edward L. Nash

1st Edition

0070460639, 978-0070460638

More Books

Students also viewed these Databases questions