Practice Free PCEP-30-02 Exam Online Questions
Question #71
What is the expected output of the following code?

- A . 1 | 1
2 | 3
3 | 4 - B . 1 | 1
2 | 3 - C . 1 | 1
- D . 1 | 1
2 | 4
Correct Answer: B
Question #72
What is the expected output of the following code if the user enters 3 and 2?

- A . 1
- B . 2
- C . 3
- D . 0
Correct Answer: D
Question #73
You want the name, the user puts in to be written back to the monitor.
What snippet would you insert in the line indicated below:

- A . input(name)
- B . name = input
- C . name = input()
- D . input(‘name’)
Correct Answer: C
Question #74
How many hashes (#) does the code output to the screen?

- A . three
- B . zero (the code outputs nothing)
- C . fi ve
- D . one
Correct Answer: A
Question #75
How many stars will the following snippet print to the monitor?

- A . The snippet will enter an in fi nite loop.
- B . 2
- C . 0
- D . 1
Correct Answer: D
Question #76
The result of the following division:
![]()
- A . cannot be evaluated
- B . is equal to 1.0
- C . is equal to 1
- D . cannot be predicted
Correct Answer: B
Question #77
The meaning of a positional argument is determined by:
- A . its position within the argument list
- B . its value
- C . its connection with existing variables
- D . the argument’s name speci fi ed along with its value
Correct Answer: A
Question #78
What do you call a computer program which directly executes instructions written in a programming language?
- A . A compiler
- B . An interpreter
- C . A translator
Correct Answer: B
Question #79
Which of the following sentences correctly describes the output of the below Python code?

- A . None of the above.
- B . res is the sum of all the number in the list.
- C . res is the smallest number in the list.
- D . res is the largest number in the list.
- E . res is the average of all the number in the list.
Correct Answer: C
Question #80
What is the expected output of the following code?

- A . 1 | False
2 | False
3 | True
4 | False
5 | True - B . 1 | True
2 | False
3 | False
4 | False
5 | True - C . 1 | True
2 | False
3 | True
4 | False
5 | False - D . 1 | True
2 | False
3 | True
4 | False
5 | True
Correct Answer: D
