Python Forum
i want to know the difference
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
i want to know the difference
#4
Not really. It checks if a number is prime. A subtle, but important difference. What role does "a" play? Is it the potential prime number, or a potential factor?

The code is poorly written. "a" should be passed as a function argument, not as a global variable. The function should return a value instead of printing a message.
Reply


Messages In This Thread
i want to know the difference - by Naisuke - Jan-23-2024, 03:05 PM
RE: i want to know the difference - by deanhystad - Jan-23-2024, 04:14 PM
RE: i want to know the difference - by Naisuke - Jan-24-2024, 03:27 PM
RE: i want to know the difference - by deanhystad - Jan-24-2024, 05:28 PM

Forum Jump:

User Panel Messages

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