Python Institute PCEP-30-02 Übungsprüfungen
Zuletzt aktualisiert am 05.06.2025- Prüfungscode: PCEP-30-02
- Prüfungsname: PCEP – Certified Entry-Level Python Programmer
- Zertifizierungsanbieter: Python Institute
- Zuletzt aktualisiert am: 05.06.2025
Consider the following code.
What would you insert instead of ???, so that the program prints the following pattern to the monitor?
- A . -1
- B . n
- C . str(n)
- D . 1
- E . 2
What is the expected output of the following code?
- A . 4
- B . The code is erroneous.
- C . 2
- D . 16
What is the expected result of running the following code?
- A . The code prints 2
- B . The code prints 1
- C . The code prints 0
- D . The code raises an unhandled exception.
You have the following le.
You want the following output: The average score for Peter is 200.00.
Which command do you have to execute in the command line?
- A . python index.py Peter 100
- B . python index.py Peter 100 200 300
- C . The code is erroneous.
- D . python index.py Peter 100 200
How many stars will the following snippet print to the monitor?
- A . three
- B . zero
- C . two
- D . one
What is the expected behavior of the following program if the user enters 0?
- A . The program will raise the ZeroDivisionError exception
- B . The program will raise the ValueError exception
- C . The program will raise the TypeError exception
- D . The program will output 0 to the console
Consider the following code.
Which of the inputs below would produce the speci fi ed output?
A ) None of the above.
B )
C ) Both are correct.
D )
- A . Option A
- B . Option B
- C . Option C
- D . Option D
Which of the following statements are true? (Choose two.)
- A . The None value can be assigned to variables
- B . The None value can be used as an argument of arithmetic operators
- C . The None value can be compared with variables
- D . The None value cannot be used outside functions
Which of the following lines properly starts a function using two parameters, both with zeroed default values?
- A . def fun(a=0, b=0):
- B . def fun(a=b=0):
- C . fun fun(a=0, b):
- D . fun fun(a, b=0):
What is the expected output of the following code?
- A . 1 | False
2 | False - B . 1 | True
2 | True - C . 1 | False
2 | True - D . 1 | True
2 | False