Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: Why int() cannot pass a string representation of a float into int?
Post: Why int() cannot pass a string representation of a...

Dear all, I have a rookie question. In the following codes, we know that the second one will result in a ValueError, because the "int()" command cannot pass a string representation of a float into i...
majorjohnusa General Coding Help 1 1,902 Jul-09-2020, 04:54 AM
    Thread: What condition caused this True?
Post: RE: What condition caused this True?

(Aug-21-2019, 02:17 AM)boring_accountant Wrote: You seem to be confusing English and Python, my friend. The basic idea in Python is that anything that follows if/elif/else are statements that are ev...
majorjohnusa General Coding Help 14 4,817 Sep-02-2019, 07:50 PM
    Thread: What condition caused this True?
Post: What condition caused this True?

Hi all, I have a rookie question about True and False. This code will have a result of 1. if True: print("1") elif True: print ("2") else: print("3")On the other hand, the following code will...
majorjohnusa General Coding Help 14 4,817 Aug-20-2019, 02:27 AM
    Thread: Question Regarding the == Operator
Post: RE: Question Regarding the == Operator

(Aug-12-2019, 06:32 PM)ndc85430 Wrote: print returns None, it doesn't return the value it prints. So, in the first two examples, you're comparing None with None. Hence, the first is true and the sec...
majorjohnusa General Coding Help 4 2,312 Aug-12-2019, 06:41 PM
    Thread: Question Regarding the == Operator
Post: Question Regarding the == Operator

Hi, all. I am a new learner here and have a question regarding the "==" operator, I couldn't find answer in Google, thus, I post here. Why: using "==" between two "print" functions will always ret...
majorjohnusa General Coding Help 4 2,312 Aug-12-2019, 06:29 PM

User Panel Messages

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