Practice Free PCEP-30-02 Exam Online Questions
The meaning of the positional parameter is determined by its:
- A . appearance
- B . position
- C . name
The ABC company needs a way to fi nd the count of particular letters in their publications to ensure that there is a good balance. It seems that there have been complaints about overuse of the letter e. You need to create a function to meet the requirements.

What would you insert instead of ??? and ??? ?
- A . 1 | word in word_list
2 | word in letter - B . 1 | word_list in word
2 | letter in word - C . 1 | word in word_list
2 | letter in word - D . 1 | word is word_list
2 | letter in word - E . 1 | word_list in word
2 | word in letter - F . 1 | word in word_list
2 | letter is word
What is the expected output of the following code?

- A . 6
- B . 4
- C . 7
- D . 2
What is the expected output of the following code?

- A . 1 | True
2 | False
3 | True
4 | False - B . 1 | False
2 | False
3 | True
4 | True - C . 1 | False
2 | True
3 | True
4 | True - D . 1 | False
2 | True
3 | False
4 | True
What is the expected output of the following code?

- A . 3
- B . 13
- C . The code is erroneous.
- D . 42
Insert the correct piece of code, so that the program produces the expected output.
Expected output:
![]()
Code:
![]()
- A . print(Andy
Brown) - B . print("Andy Brown", end=" ")
- C . print("Andy Brown", sep=" ")
- D . print("Andy
Brown")
Which one of the lines should you put in the snippet below to match the expected output?
Expected output:
![]()
Code:

- A . sorted(list)
- B . sort(list)
- C . list.sort()
- D . list.sorted()
A code point is:
- A . A point used to write a code.
- B . A number which makes up a character.
- C . A code containing a point.
What is the expected output of the following code?

- A . The code is erroneous and cannot be run.
- B . ppt
- C . 213
- D . pizzapastafolpetti
B
Explanation:
The code snippet that you have sent is using the slicing operation to get parts of a string and concatenate them together.
The code is as follows:
pizza = “pizza” pasta = “pasta” folpetti = “folpetti” print(pizza[0] + pasta[0] + folpetti[0])
The code starts with assigning the strings “pizza”, “pasta”, and “folpetti” to the variables pizza, pasta, and folpetti respectively. Then, it uses the print function to display the result of concatenating the first characters of each string. The first character of a string can be accessed by using the index 0 inside square brackets. For example, pizza[0] returns “p”. The concatenation operation is used to join two or more strings together by using the + operator. For example, “a” + “b” returns “ab”. The code prints the result of pizza[0] + pasta[0] + folpetti[0], which is “p” + “p” + “f”, which is “ppt”.
The expected output of the code is ppt, because the code prints the first characters of each string.
Therefore, the correct answer is B. ppt.
Reference: Python String Slicing – W3SchoolsPython String Concatenation – W3Schools
What is the expected output of the following code?

- A . (2, 1, 1)
- B . (1, 1, 1)
- C . (2, 2, 2)
- D . The code is erroneous.
