PCEP-30-02 Deutsch試験無料問題集「Python Institute PCEP - Certified Entry-Level Python Programmer (PCEP-30-02 Deutsch Version) 認定」

Was trifft auf Tupel zu? (Wählen Sie zwei Antworten aus.)

解説: (GoShiken メンバーにのみ表示されます)
Welche der folgenden Funktionen kann mit zwei Argumenten aufgerufen werden?

解説: (GoShiken メンバーにのみ表示されます)
Ordnen Sie die binären numerischen Operatoren in der Reihenfolge an, die ihre Prioritäten widerspiegelt, wobei die oberste Position die höchste Priorität und die unterste Position die niedrigste Priorität hat.
正解:

Explanation:

The correct order of the binary numeric operators in Python according to their priorities is:
Exponentiation (**)
Multiplication (*) and Division (
Addition (+) and Subtraction (
This order follows the standard mathematical convention of operator precedence, which can be remembered by the acronym PEMDAS (Parentheses, Exponents, Multiplication/Division, Addition/Subtraction). Operators with higher precedence are evaluated before those with lower precedence, but operators with the same precedence are evaluated from left to right. Parentheses can be used to change the order of evaluation by grouping expressions.
For example, in the expression 2 + 3 * 4 ** 2, the exponentiation operator (**) has the highest priority, so it is evaluated first, resulting in 2 + 3 * 16. Then, the multiplication operator (*) has the next highest priority, so it is evaluated next, resulting in 2 + 48. Finally, the addition operator (+) has the lowest priority, so it is evaluated last, resulting in 50.
You can find more information about the operator precedence in Python in the following references:
6. Expressions - Python 3.11.5 documentation
Precedence and Associativity of Operators in Python - Programiz
Python Operator Priority or Precedence Examples Tutorial