Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
max_minus_min_abs
#1
I have to come up with a code for max_minus_min_abs but I am confused on where to enter the numbers I am passing through. This is what I am using

import math
 
def max_minus_min_abs(first_num, second_num):
    return max(first_num, second_num) - min(first_num, second_num)
    print(max_minus_min_abs(15, 4))
Gribouillis write Sep-17-2023, 08:17 PM:
Please post all code, output and errors (it it's entirety) between their respective tags. Refer to BBCode help topic on how to post. Use the "Preview Post" button to make sure the code is presented as you expect before hitting the "Post Reply/Thread" button.
Reply


Messages In This Thread
max_minus_min_abs - by whatdoyoumeanitwontpassthru - Sep-17-2023, 08:07 PM
RE: max_minus_min_abs - by Pedroski55 - Sep-18-2023, 06:35 AM
RE: max_minus_min_abs - by deanhystad - Sep-18-2023, 11:26 AM
RE: max_minus_min_abs - by ICanIBB - Sep-21-2023, 02:05 AM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020