Arrange the code boxes in the correct positions to form a conditional instruction which guarantees that a certain statement is executed when the speed variable is less than 50.0.
正解:
Explanation
One possible way to arrange the code boxes in the correct positions to form a conditional instruction which guarantees that a certain statement is executed when the speed variable is less than 50.0 is:
if speed < 50.0:
print("The speed is low.")
This code uses the if keyword to create a conditional statement that checks the value of the variable speed. If the value is less than 50.0, then the code will print "The speed is low." to the screen. The print function is used to display the output. The code is indented to show the block of code that belongs to the if condition.
You can find more information about the if statement and the print function in Python in the following references:
Python If ... Else
Python Print Function
質問 2:
Which of the following expressions evaluate to a non-zero result? (Select two answers.)
A. 1 * 4 // 2 ** 3
B. 4 / 2 * * 3 - 2
C. 1 * * 3 / 4 - 1
D. 2 ** 3 / A - 2
正解:B,D
解説: (Pass4Test メンバーにのみ表示されます)
質問 3:
What is the expected output of the following code?
A. 4
B. 5
C. The code raises an exception and outputs nothing.
D. 6
正解:C
解説: (Pass4Test メンバーにのみ表示されます)
西田** -
要点をしっかり抑えながら学ぶことができます。より効率良く合格を目指す私のための,必携のPCEP-30-02試験対策書だと思う