Font size
WorksheetsPython, dJango & ReactJS
Total questions: 10
Worksheet time: 5hrs 0mins
Candidates Exam - Python with Django + React
Total Questions: 9
Section 1: Python with Django (Q - 3)
Section 2: React (Q - 3)
Section 3: General Development (Q - 3)
Section 1: Python with Django
1. Implement logging and exception handling mechanism in python with Django, use well known concepts and design patterns.
Section 1: Python with Django
Implement database interaction using Django ORM, consider 2 entities - Author (name and age) and Book (name, pulication_date and Author), show all CRUD operations and some complex queries.
Section 1: Python with Django
You are tasked with creating a simple RESTful API using Django and Django REST Framework (DRF) to manage a blog.
The API should allow clients to perform CRUD (Create, Read, Update, Delete) operations on blog posts.
Each blog post has a title, content, and publication date. How would you implement this?
Section 2: React
State Management, Create a React component for a dynamic form where the number of input fields can be increased by the user.
Manage the state of all input fields using a single-state object.
Section 2: React
React Hooks, Create a component that uses react hooks to update the document title every time the component updates, based on a piece of state.
Section 2: React
Create a component that fetches data from an API using HTTP client and displays it. Include error handling and loading state.
Section 3: General Development
Write a function in (in any code) that finds the factorial of a given integer using recursion.
Section 3: General Development
Given a sorted array from 1 to N, there is a bug that somewhere in the array there is a jump of 1 number, Write an algorithm in Python/React to find the index of the jump.
Example:
index 0 1 2 3 4 5 6 7 8 9
value 0 1 2 3 5 6 7 8 9 10
Section 3: General Development
Write a SQL query to retrieve all unique customers who have made purchases in the last month from a "Customers" table and an "Orders" table.
Assuming you have a "Customers" table with a unique "CustomerID" and an "Orders" table with a "CustomerID" and a "OrderDate" column, here's a SQL query.
Bonus Question:
Imagine you are building a feature for a real-time collaborative document editor (like Google Docs) where multiple users can edit the same document simultaneously.
Describe how you would approach implementing this feature, considering aspects like conflict resolution, performance, and user experience.
Also, discuss the technologies or algorithms you might use.
Create a basic prototype of a real-time text editor.
Focus on setting up a WebSocket server and enabling live text updates across multiple clients.
