while True means loop forever. The while statement takes an expression and executes the loop body while the expression evaluates to (boolean) "true". True always evaluates to boolean "true" and thus executes the loop body indefinitely.
'True' is a boolean value, can't be a Boolean Operator, those are well defined as (AND, OR, XOR, etc.). In this case, "True" is also the entirety of the conditional expression that is expected by the while loop. As it so happens, this expression always returns the same value (True).
Yes, True is a boolean operator and yes, it is being used within a while loop. However, it is specifically being used as a condition within the while loop to execute the print command is it is met
Boolean Operator must have AND, OR, XOR. Do a simple google search. So is a conditional. The condition is while [TRUE] white True is True. True is always True so it is a conditional.
B. A conditional. Yes, True/False are boolean. It asks which of the following describes "True". A while loop repeats the block of code based on a given Boolean condition. However, in the statement true is the condition.
while condition:
body of while loop containing code that does something
C. A Boolean operator: True is a Boolean value in Python, which is used in the context of the while loop’s condition. Since True always evaluates to True, this creates an infinite loop.
A. A while loop: The while keyword indicates the beginning of a while loop, but it does not describe what True is.
B. A conditional: While the while loop contains a conditional statement, True itself is not the conditional but rather the value used in the conditional expression.
D. An arithmetic operator: Arithmetic operators include symbols like +, -, *, and /, which are used for mathematical operations. True is not an arithmetic operator.
Isn't the "True" keyword itself a boolean operator?
upvoted 2 times
...
...
This section is not available anymore. Please use the main Exam Page.PT0-002 Exam Questions
Log in to ExamTopics
Sign in:
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
DRVision
Highly Voted 1 year, 5 months agoPhillyCheese
10 months, 2 weeks agoFasterN8
Highly Voted 9 months, 1 week agostudy_study
Most Recent 3 weeks, 1 day agoBlackSkullz
4 months, 2 weeks agoBlackSkullz
4 months, 2 weeks agoNikamy
5 months, 1 week agofecffa8
5 months, 1 week agolujaga
5 months, 3 weeks ago3d8c4e3
8 months, 3 weeks agoEtc_Shadow28000
9 months, 2 weeks agoCyber_Soter
12 months agoPeteyPete
12 months agoBig_Dre
1 year, 1 month agoLiveLaughToasterBath
1 year, 2 months agoLiveLaughToasterBath
1 year, 2 months ago[Removed]
1 year, 4 months agoAlizade
1 year, 5 months agoElDirec
1 year, 3 months agoNelsito
1 year, 5 months ago