Python Forum
Return Statement in Python IDLE editor
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Return Statement in Python IDLE editor
#10
Just an FYI
Quote:but no luck using that either
this in pycharm:
def compare(x, y):
   if x > y:
       return 1
   if x == y:
       return 0
   if x < y:
       return -1
print(compare(5, 7))
Output:
-1 Process finished with exit code 0
Reply


Messages In This Thread
Return Statement in Python IDLE editor - by NMW - Jul-11-2017, 06:44 PM
RE: Return Statement in Python IDLE editor - by NMW - Jul-11-2017, 07:40 PM
RE: Return Statement in Python IDLE editor - by NMW - Jul-11-2017, 08:48 PM
RE: Return Statement in Python IDLE editor - by NMW - Jul-11-2017, 09:31 PM
RE: Return Statement in Python IDLE editor - by NMW - Jul-11-2017, 09:47 PM
RE: Return Statement in Python IDLE editor - by Larz60+ - Jul-11-2017, 09:47 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Python editor that will SFTP automatically on save sawtooth500 1 401 Apr-30-2024, 05:13 AM
Last Post: Gribouillis
  Why can I not see the code correctly in Python IDLE.? Trump 8 996 Apr-04-2024, 07:47 AM
Last Post: jonesphedra
  Launch Python IDLE Shell from terminal Pavel_47 5 1,490 Feb-17-2023, 02:53 PM
Last Post: Pavel_47
  Python Idle won't start totalmachine 9 3,935 Oct-16-2022, 05:57 PM
Last Post: totalmachine
  Why is IDLE not opening on a MacOS Montery 12.6 and using Python 3.10.7? Merlin385 7 1,942 Oct-08-2022, 08:36 PM
Last Post: Merlin385
  Need help with Return statement Columbo 13 2,643 Sep-17-2022, 04:03 PM
Last Post: Columbo
  Sublime Text Editor not recognizing Python elroberto 5 3,175 Jun-13-2022, 04:00 PM
Last Post: rob101
  Music Notation editor; how to build the editor? direction to go? philipbergwerf 1 1,833 Jan-01-2022, 04:56 PM
Last Post: Larz60+
  MAC Python IDLE issue shadow12 4 2,766 Oct-29-2021, 12:22 AM
Last Post: shadow12
  Python MYSQL connection does not work after 1h idle zazas321 9 7,386 Oct-07-2021, 12:02 PM
Last Post: ndc85430

Forum Jump:

User Panel Messages

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