Python Institute PCEP-30-02 Practice Exams
Last updated on Apr 13,2025- Exam Code: PCEP-30-02
- Exam Name: PCEP – Certified Entry-Level Python Programmer
- Certification Provider: Python Institute
- Latest update: Apr 13,2025
The ABC Video company needs a way to determine the cost that a customer will pay for renting a DVD. The cost is dependent on the time of day the DVD is returned. However, there are also special rates on Thursdays and Sundays.
The fee structure is shown in the following list:
• The cost is $1.59 per night.
• If the DVD is returned after 8 PM, the customer will be charged an extra day.
• If the video is rented on a Sunday, the customer gets 30% off for as long as they keep the video.
• If the video is rented on a Thursday, the customer gets 50% off for as long as they keep the video.
You need to write code to meet the requirements.
What should you insert instead of XXX, YYY and ZZZ?
A )
B )
C )
D )
E )
- A . Option A
- B . Option B
- C . Option C
- D . Option D
The following snippet:
- A . will output 4
- B . is erroneous
- C . will output None
- D . will output 2
What is the best de fi nition of a script?
- A . It’s a text le that contains sequences of zeroes and ones
- B . It’s a text le that contains instructions which make up a Python program
- C . It’s an error message generated by the interpreter
- D . It’s an error message generated by the compiler
Select the true statements: (Choose two.)
- A . You can use keywords as variable names in Python
- B . You can use keywords as function names in Python
- C . You cannot use keywords as variable names in Python
- D . You cannot use keywords as function names in Python
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 way of passing arguments in which the order of the arguments determines the initial parameter’s values is referred to as:
- A . positional
- B . sequential
- C . ordered
What is the expected behavior of the following program?
- A . The program will output Hello! to the screen
- B . The program will generate an error on the screen
- C . The program will output ("Hello!") to the screen
- D . The program will output "Hello!" to the screen
Which of the following variable names is illegal?
- A . TRUE
- B . True
- C . tRUE
- D . true