CherryPy is an object-oriented web application framework using the Python programming language. It is designed for rapid development of web applications by wrapping the HTTP protocol but stays at a low level and does not offer much more than what is defined in RFC 7231. (Wikipedia)
CherryPy MCQs: This section contains multiple-choice questions and answers on the various topics of CherryPy. Practice these MCQs to test and enhance your skills on CherryPy.
List of CherryPy MCQs
1. CherryPy is a web framework of ____?
- Python
- C
- Java
- All of the above
Answer: A) Python
Explanation:
CherryPy is a web framework of Python.
2. Who developed CherryPy?
- James Gosling
- Dennis Ritchie
- Guido van Rossum
- Remi Delon
Answer: D) Remi Delon
Explanation:
CherryPy Developed by Remi Delon.
3. In which year CherryPy was developed?
- 2009
- 2001
- 2002
- 2003
Answer: C) 2002
Explanation:
CherryPy is a web framework that was developed in the year 2002.
4. Which of the following uses CherryPy Framework?
- Netflix
- Amazon Prime
- Hulu
- Both A and C
- Only B
- Only C
Answer: D) Both A and C
Explanation:
Netflix and HULU use CherryPy.
5. When was CherryPy’s first version released?
- In June 2002
- In January 2002
- In December 2002
- In November 2002
Answer: A) In June 2002
Explanation:
CherryPy’s first version was released in June 2002.
ADVERTISEMENT
6. Is CherryPy an open-source framework?
- Yes
- No
Answer: A) YES
Explanation:
Yes, CherryPy is an open-source framework.
7. Does CherryPy follow object-oriented concepts?
- Yes
- No
Answer: A) YES
Explanation:
Yes, CherryPy is an object-oriented python framework.
8. Does CherryPy allow users to perform CRUD operations?
- Yes
- No
Answer: A) YES
Explanation:
Yes, CherryPy allows us to perform CRUD operations and we can also manage the project from anywhere.
9. Does CherryPy follow the MVC architecture?
- Yes
- No
Answer: A) YES
Explanation:
Yes, CherryPy follows the MVC architecture.
10. Does CherryPy have its production-ready HTTP server to host your application?
- Yes
- No
Answer: A) YES
Explanation:
Yes, CherryPy has its production-ready HTTP server to host your application.
ADVERTISEMENT
11. Which of the following are the features of CherryPy?
- Simplicity
- Open-source
- Community help
- All of the above
Answer: D) All of the above
Explanation:
Features of CherryPy are as follows:
- CherryPy is very simple to use and understand as it is a python framework.
- CherryPy is an open-source project that means anyone, anywhere on the internet can use this and can download this for free.
- It has a devoted community that provides complete support.
12. Using which of the following ways can you install CherryPy?
- Using a Tarball
- Using easy_install
- Using Subversion
- All of the above
Answer: D) All of the above
Explanation:
Using any of the following ways you can install CherryPy:
Using a Tarball, using easy_install, Using Subversion.
13. A ____ is a compressed archive of files or a directory?
- Tarball
- Directory
- Subversion
- All of the above
Answer: A) Tarball
Explanation:
A Tarball is a compressed archive of files or a directory.
14. In which of the following situations, it is suggested to install CherryPy using Subversion?
- To fix bugs in the previous release.
- When the developer is working on CherryPy.
- When a branch from the main branch in the versioning control repository is requested by the user.
- All of the above
Answer: D) All of the above
Explanation:
It is suggested to install CherryPy using Subversion, in the following situations:
- To fix bugs in the previous release.
- When the developer is working on CherryPy.
- When a branch from the main branch in the versioning control repository is requested by the user.
15. ____ is the component that facilitates one or more applications?
- Application
- Application server
- Web server
- Web application server
Answer: B) Application server
Explanation:
The application server is the component that facilitates one or more applications.
ADVERTISEMENT
16. Which of the following is known to be a hybrid of a web server and an application server?
- Application
- Application server
- Web server
- Web application server
Answer: D) Web application server
Explanation:
A web application server is a hybrid of a web server and an application server.
17. ____ is a connector for something like the HTTP protocol?
- Application
- Application server
- Web server
- Web application server
Answer: C) Web server
Explanation:
A web server is a connector for something like the HTTP protocol.
18. Which of the following is known to be a piece of software that involves the collection of data?
- Application
- Application server
- Web server
- Web application server
Answer: A) Application
Explanation:
An application is a piece of software that involves the collection of data.
19. Which of the following keeps track of requests and responses?
- Application
- Application server
- Web server
- Web application server
Answer: C) Web server
Explanation:
The web server keeps track of requests and responses.
20. Which of the following functions starts the web server in CherryPy?
- cherryPy.server.initiate()
- cherryPy.server.quickstart()
- cherryPy.server.start()
Answer: B) cherryPy.server.quickstart()
Explanation:
cherryPy.server.quickstart() function starts the web server in CherryPy.
ADVERTISEMENT
21. Which of the following are the responsibilities of the internal engine of Cherry?
- Creation of request and response objects.
- Management of request and response objects.
- Controlling the CherryPy process.
- Managing the CherryPy process.
- All of the above
Answer: D) All of the above
Explanation:
Following are the responsibilities of the internal engine Cherry:
- Creation of request and response objects.
- Management of request and response objects.
- Controlling the CherryPy process.
- Managing the CherryPy process.
22. Does CherryPy have its configuration system?
- Yes
- No
Answer: A) YES
Explanation:
Yes, CherryPy has its configuration system.
23. If a client states that it supports ____, it must include a header field in any request by using the protocol version?
- HTTP
- HTTP/1.1
- HTTP/1.0
Answer: B) HTTP/1.1
Explanation:
If a client states that it supports HTTP/1.1, it must include a header field in any request by using the protocol version.
24. Which of the following are the thread data containers in CherryPy?
- CherryPy.response
- CherryPy.request
- CherryPy.client
- Cherry.server
- Both A and B
- Both C and D
Answer: E) Both A and B
Explanation:
CherryPy.response and CherryPy.request are the thread data containers in CherryPy.
25. CherryPy is centered around the concept of ____?
- Single threading
- Multithreading
- User-level threading
Answer: B) Multithreading
Explanation:
CherryPy is centered around the concept of multithreading.
26. HTTP supports how many types of authentications?
- 2
- 3
- 4
- 5
Answer: A) 2
Explanation:
HTTP supports 2 types of authentications: Basic and digest.
27. In which of the following HTTP authentications, the user submits the credential in clear text with minimal authentication, thus any potential hacker who sees the request may read the password?
- Basic
- Digest.
Answer: A) Basic
Explanation:
In Basic authentication, the user submits the credential in clear text with minimal authentication, thus any potential hacker who sees the request may read the password.
28. How many arguments are there in basic authentication tools?
- 4
- 5
- 3
- 2
Answer: C) 3
Explanation:
Basic authentication tools have three arguments: Realm, Users, and encrypt.
29. Which of the following functions returns a hard-coded dictionary and also fetches the values from databases?
- Get_users
- User_get
- Users
- get
Answer: A) Get_users
Explanation:
Get_users returns a hard-coded dictionary and also fetches the values from databases.
30. Is the basic authentication tool secure?
- Yes
- No
Answer: B) NO
Explanation:
No, the basic authentication mechanism is insecure since an adversary may encode and decode the password.
ADVERTISEMENT
31. Which of the following tool’s objective is to provide basic authentication to the application’s desired purposes?
- Decoding tool
- Caching tool
- Basic authentication tool
Answer: C) Basic authentication tool
Explanation:
Basic authentication tool’s objective is to provide basic authentication to the application’s desired purposes.
32. Which of the following tool’s objectives is to offer memory caching of CherryPy-produced material?
- Decoding tool
- Caching tool
- Basic authentication tool
Answer: B) Caching tool
Explanation:
Caching tool This tool’s objective is to offer memory caching of CherryPy-produced material.
33. How many arguments are there in the caching tool?
- 4
- 5
- 3
- 2
Answer: D) 2
Explanation:
Caching tools have two arguments: invalid_methods, and cache_class.
34. Which of the following tool’s mission is to decipher the receiving response parameters?
- Decoding tool
- Caching tool
- Basic authentication tool
Answer: A) Decoding tool
Explanation:
Decoding tool’s mission is to decipher the receiving response parameters.
35. How many arguments are there in the decoding tool?
- 4
- 5
- 3
- 2
Answer: D) 2
Explanation:
Decoding tools have two arguments encoding, and default_encoding.
36. All of the objects that will be mounted on the CherryPy.tree are implemented in which of the following files?
- Config.py
- Model.py
- Controllers.py
- Server.py
Answer: C) Controllers.py
Explanation:
All of the objects that will be mounted on the CherryPy.tree are implemented in controllers.py.
37. Which of the following file interacts directly with the database to provide various services or to store permanent data?
- Config.py
- Model.py
- Controllers.py
- Server.py
Answer: B) Model.py
Explanation:
Model.py file interacts directly with the database to provide various services or to store permanent data.
38. Which of the following communicates with a production-ready web server that is interoperable with a load-balancing proxy?
- Config.py
- Model.py
- Controllers.py
- Server.py
Answer: D) Server.py
Explanation:
Model.py file interacts directly with the database to provide various services or to store permanent data.
39. Which of the following files includes all the CSS and image files?
- Static
- View
- Controllers.py
- Server.py
Answer: A) Static
Explanation:
Static files include all the CSS and image files.
40. Which of the following files includes all the template files for a given application?
- Static
- View
- Controllers.py
- Server.py
Answer: B) View
Explanation:
View files include all the template files for a given application.
41. Which of the following functions is a default function that is loaded initially when a certain controller is called?
- Initiate()
- Get()
- Index()
- Users()
Answer: C) Index()
Explanation:
The index function is a default function that is loaded initially when a certain controller is called.
42. The values to be stored will be shown in the URL when using the ____ method?
- POST
- PUT
- GET
Answer: C) GET
Explanation:
The values to be stored will be shown in the URL when using the “GET” method.
43. What is the full form of REST?
- Representational state transfer
- Represent electronic state transfer
- Recognize state transfer
Answer: A) Representational state transfer
Explanation:
REST stands for Representational state transfer.
44. A sort of remote access protocol in which state is sent from client to server and may be used to alter state rather than invoking remote operations?
- Representational state transfer
- Application Programming Interface
- Hypertext Transfer Protocol
Answer: A) Representational state transfer
Explanation:
REST is a sort of remote access protocol in which state is sent from client to server and may be used to alter state rather than invoking remote operations.
45. If the REST infrastructure is built on the HTTP foundation, these IDs are known as ____?
- Application Programming Interface
- Hypertext Transfer Protocol
- Uniform resource locator
- Uniform resource identifiers
Answer: D) Uniform resource identifiers
Explanation:
If the REST infrastructure is built on the HTTP foundation, these IDs are known as Uniform Resource Identifiers (URIs).
46. How many subsets does URI have?
- 2
- 3
- 4
- 5
Answer: A) 2
Explanation:
URI has two subsets: URL and URN.
47. What is URN?
- Uniform reserve name
- Unified resource nomenclature
- Uniform resource name
Answer: C) Uniform resource name
Explanation:
URN stands for the uniform resource name.
48. What is a URL?
- Uniform reserve location
- Unified resource location
- Uniform resource locator
Answer: C) Uniform resource locator
Explanation:
URL stands for uniform resource locator.
49. How many components does CherryPy have?
- 2
- 3
- 4
- 5
Answer: B) 3
Explanation:
Three components are there in CherryPy: cherrypy.engine, cherrypy.server, cherrypy.tools.
50. Which of the following components in CherryPy controls the start/stop of processes and event processing?
- cherrypy.engine
- cherrypy.server
- cherrypy.tools.
Answer: A) cherrypy.engine
Explanation:
The cherrypy.engine component controls the start/stop of processes and event processing.
51. Which of the following components in CherryPy It sets up and manages the WSGI or HTTP server?
- cherrypy.engine
- cherrypy.server
- cherrypy.tools.
Answer: B) cherrypy.server
Explanation:
Cherrypy.server sets up and manages the WSGI or HTTP server.
52. Which of the following components in CherryPy is a collection of utilities that are unrelated to the execution of an HTTP request?
- cherrypy.engine
- cherrypy.server
- cherrypy.tools.
Answer: C) cherrypy.tools.
Explanation:
Cherrypy.tools is a collection of utilities that are unrelated to the execution of an HTTP request.
53. ____ aids in the validation of the users with whom we engage?
- Authentication
- Authorization
Answer: A) Authentication
Explanation:
Authentication aids in the validation of the users with whom we engage.
54. The ____ process ensures the URI process remains sane?
- Authentication
- Authorization
- Encapsulation
Answer: B) Authorization
Explanation:
The authorization process ensures the URI process remains sane.
55. Does CherryPy support encapsulation?
- Yes
- No
Answer: A) YES
Explanation:
Yes, CherryPy supports encapsulation.
56. ERROR CODE 400 in CherryPy indicates ____?
- Bad request
- Unauthorized request
- Unauthorized access
Answer: A) Bad request
Explanation:
ERROR CODE 400 in CherryPy indicates a bad request.
57. ERROR CODE 403 in CherryPy indicates ____?
- Bad request
- Unauthorized request
- Unauthorized access
Answer: B) Unauthorized request
Explanation:
ERROR CODE 403 in CherryPy indicates an unauthorized request.
58. In which of the following HTTP methods a request is made to the server to create a new resource based on the data contained in the request body?
- HEAD
- PUT
- POST
- GET
Answer: C) POST
Explanation:
In the POST, HTTP method a request is made to the server to create a new resource based on the data contained in the request body.
59. Which of the following HTTP method specifies that a resource enclosed in the request body should be replaced by the one requested?
- HEAD
- PUT
- POST
- GET
Answer: B) PUT
Explanation:
PUT method specifies that a resource enclosed in the request body should be replaced by the one requested.
60. What do you mean by APP in CherryPy?
- Application process protocol
- Atom publishing protocol
- Application publishing protocol
Answer: B) Atom publishing protocol
Explanation:
APP stands for Atom publishing protocol.
61. What is the Atom publishing protocol?
- A protocol that allows the publishing and editing of web resources.
- A protocol that performs a set of operations between APP service and user agent.
- All of the above
Answer: C) All of the above
Explanation:
Atom publishing protocol is a protocol that allows the publishing and editing of web resources, also it performs a set of operations between the APP service and user agent.
62. In CherryPy, APP is an ____?
- Application-level protocol
- Transport level protocol
- Network level protocol
Answer: A) Application-level protocol
Explanation:
Atom publishing protocol is an application-level protocol.
63. As part of its role, the ____layer ensures that the communication passing through it is directed toward the intended audience?
- Application-layer
- Transport layer
- Presentation layer
- Network layer
Answer: C) Presentation layer
Explanation:
As part of its role, the Presentation Layer ensures that the communication passing through it is directed toward the intended audience.
64. In CherryPy Kid template is written in which of the following languages?
- Python
- C
- C++
- Java
Answer: A) Python
Explanation:
The kid template is written in python.
65. Which of the following kid template commands in CherryPy returns a string representation of the output content?
- write
- Serialize
- Generate
Answer: B) Serialize
Explanation:
Serialize function returns a string representation of the output content.
66. Which of the following kid template commands in CherryPy returns the output content as an iterator?
- write
- Serialize
- Generate
Answer: C) Generate
Explanation:
The generate command returns the output content as an iterator.
67. With which of the following kid template commands in CherryPy, a file object is created with the output content?
- write
- Serialize
- Generate
Answer: A) write
Explanation:
With the Write command, a file object is created with the output content.
68. What is the full form of AJAX?
- Asynchronous JavaScript
- Asynchronous JavaScript and XML
- Asynchronous Java and XML
Answer: B) Asynchronous JavaScript and XML
Explanation:
AJAX stands for Asynchronous JavaScript and XML.
69. Which of the following are examples of AJAX applications?
- Google Maps
- Gmail
- YouTube
- All of the above
Answer: E) All of the above
Explanation:
Google Maps, Gmail, YouTube, and Facebook are examples of AJAX applications.
70. Which of the following are the alternatives of CherryPy?
- Django
- Bottle
- Pyramid
- BlueBream
- All of the above
Answer: E) All of the above
Explanation:
Django, Bottle, Pyramid, BlueBream, TurboGears, ActiveState Platform.