CherryPy MCQ Questions & Answers
CherryPy MCQs : This section focuses on "CherryPy" of Python Frameworks. These Multiple Choice Questions (MCQ) should be practiced to improve the CherryPy skills required for various interviews (campus interviews, walk-in interviews, company interviews), placements, entrance exams and other competitive examinations.
1. Remi Delon released the first version of CherryPy in late?
A. 2001
B. 2002
C. 2003
D. 2004
View Answer
Ans : B
Explanation: Remi Delon released the first version of CherryPy in late June 2002.
2. Which of the following is true regarding CherryPy?
A. CherryPy was close to the model-view-controller pattern
B. CherryPy can map a URL and its query string into a Python method call
C. A CherryPy class has to be processed and compiled by the CherryPy engine
D. All of the above
View Answer
Ans : D
Explanation: All of the above are true regarding CherryPy.
3. Does CherryPy comes with its own web (HTTP) server?
A. TRUE
B. FALSE
C. Can be true or false
D. Can not say
View Answer
Ans : A
Explanation: True, CherryPy comes with its own web (HTTP) server.
4. To start the web server, a user must make the following call?
A. cherryPy.server.start()
B. cherryPy.client.quickstart()
C. cherryPy.server.quickstart()
D. cherryPy.client.start()
View Answer
Ans : C
Explanation: To start the web server, a user must make the following call : cherryPy.server.quickstart()
5. Which of the following are the strengths of Cherrypy?
A. Open-source
B. Simplicity
C. Cost effective
D. All of the above
View Answer
Ans : D
Explanation: All of the above are the strengths of Cherrypy.
6. CherryPy can handle response ______________ with the support of clients.
A. status code (400)
B. status code (100)
C. status code (505)
D. status code (200)
View Answer
Ans : B
Explanation: CherryPy can handle response status code (100) with the support of clients.
7. CherryPy supports requests in ___________ distinct ways.
A. 0
B. 1
C. 2
D. 3
View Answer
Ans : C
Explanation: CherryPy supports requests in two distinct ways − If-Modified-Since and If-Unmodified-Since headers and sends responses as per the requests accordingly.
8. CherryPy is designed based on the multithreading concept.
A. TRUE
B. FALSE
C. Can be true or false
D. Can not say
View Answer
Ans : A
Explanation: True, CherryPy is designed based on the multithreading concept.
9. Which of the following tool is to decode the incoming request parameters?
A. Encoding
B. Decoding
C. Caching
D. Authentication
View Answer
Ans : B
Explanation: The purpose of this tool is to decode the incoming request parameters.
10. Which of the following true regarding Basic Authentication Tool?
A. The purpose of this tool is to provide memory caching of CherryPy generated content
B. The purpose of this tool is to decode the incoming request parameters
C. The purpose of this tool is to provide basic authentication to the application designed in the application.
D. None of the above
View Answer
Ans : C
Explanation: The purpose of this tool is to provide basic authentication to the application designed in the application.
11. Which of the following controls process startup/teardown and event handling?
A. cherrypy.server
B. cherrypy.tools
C. cherrypy.client
D. cherrypy.engine
View Answer
Ans : D
Explanation: cherrypy.engine : It controls process startup/teardown and event handling.
12. Which HTTP method retrieves the resource metadata?
A. GET
B. HEAD
C. POST
D. PUT
View Answer
Ans : B
Explanation: HEAD: Retrieves the resource metadata
13. App stands for?
A. Atom Post Protocol
B. Atom Put Protocol
C. Atom Publishing Process
D. Atom Publishing Protocol
View Answer
Ans : D
Explanation: App stands for Atom Publishing Protocol.
14. Which HTTP method Requests the server to remove the resource identified by that URI?
A. OPTIONS
B. PUT
C. DELETE
D. REMOVE
View Answer
Ans : C
Explanation: DELETE: Requests the server to remove the resource identified by that URI.
15. The Atom Publishing Protocol defines a set of operations between an APP service and a user-agent using HTTP.
A. TRUE
B. FALSE
C. Can be true or false
D. Can not say
View Answer
Ans : A
Explanation: True, The Atom Publishing Protocol defines a set of operations between an APP service and a user-agent using HTTP.
16. _________ is a simple template engine which includes the name of the template to be processed (which is mandatory) and input of the data to be passed when the template is rendered.
A. App
B. Kid
C. Cpl
D. Atom
View Answer
Ans : B
Explanation: Kid is a simple template engine which includes the name of the template to be processed (which is mandatory) and input of the data to be passed when the template is rendered.
17. The kid.Template function returns an instance of the template class which can be used to render the output content.
A. TRUE
B. FALSE
C. Can be true or false
D. Can not say
View Answer
Ans : A
Explanation: True, The kid.Template function returns an instance of the template class which can be used to render the output content.
18. Which are thread-data containers, which imply that your application calls them independently by knowing which request is proxied through them at runtime?
A. cherrypy.request
B. cherrypy.response
C. Both A and B
D. None of the above
View Answer
Ans : C
Explanation: Both cherrypy.request and cherrypy.response are thread-data containers, which imply that your application calls them independently by knowing which request is proxied through them at runtime.
19. The internal engine of CherryPy is responsible for?
A. Controlling the CherryPy process
B. Managing the CherryPy process
C. Creation and management of request and response objects
D. All of the above
View Answer
Ans : D
Explanation: The internal engine of CherryPy is responsible for the following activities : Creation and management of request and response objects, Controlling and managing the CherryPy process.
20. CherryPy handles the combinations of HTTP versions between the client and the setting set for the server.
A. Yes
B. No
C. Can be yes or no
D. Can not say
View Answer
Ans : A
Explanation: Yes, CherryPy handles the combinations of HTTP versions between the client and the setting set for the server.
Discussion