Questions and Tasks on: Strapi, HTML, CSS, JavaScript, ReactJS, and Linux
Tasks and Questions covering Strapi, HTML, CSS, JavaScript, ReactJS, and Linux. These questions include a mix of multiple-choice questions (MCQs), text fields for open-ended responses, and code snippets :
Strapi MCQ:
-
Question 1 (MCQ):
- What is Strapi primarily used for?
- A) E-commerce
- B) Content management
- C) Game development
- D) Video editing
- What is Strapi primarily used for?
-
Question 2 (MCQ):
- Which database types does Strapi support out of the box?
- A) MySQL and PostgreSQL
- B) SQLite and NoSQL
- C) MongoDB and Redis
- D) JSON and XML
- Which database types does Strapi support out of the box?
-
Question 3 (MCQ):
- What is a "Content Type" in Strapi?
- A) A type of font
- B) A data structure to define content
- C) A programming language
- D) A type of web server
- What is a "Content Type" in Strapi?
-
Question 4 (MCQ):
- Which authentication strategies are supported by Strapi?
- A) Username and password only
- B) Social media logins only
- C) Both username/password and social media logins
- D) None; Strapi doesn't support authentication
- Which authentication strategies are supported by Strapi?
-
Question 5 (MCQ):
- What is the purpose of "Roles and Permissions" in a Strapi project?
- A) To change the project's name
- B) To manage user access and permissions
- C) To define the project's layout
- D) To create custom content types
- What is the purpose of "Roles and Permissions" in a Strapi project?
HTML Open-Ended:
-
Question 6 (Text Field):
- Describe the purpose of the HTML
<header>
element and provide an example of when you would use it in a webpage.
- Describe the purpose of the HTML
-
Question 7 (Text Field):
- Explain the role of the HTML
<a>
element in creating hyperlinks. Provide an example of an anchor tag linking to an external website.
- Explain the role of the HTML
CSS MCQ:
-
Question 8 (MCQ):
- Which CSS property is used to change the color of text?
- A)
font-color
- B)
text-color
- C)
color
- D)
text-fill
- A)
- Which CSS property is used to change the color of text?
-
Question 9 (MCQ):
- What does CSS stand for?
- A) Computer Style Sheets
- B) Creative Style Sheets
- C) Cascading Style Sheets
- D) Colorful Style Sheets
- What does CSS stand for?
JavaScript Code Snippet:
-
Question 10 (Code Snippet):
- Complete the JavaScript function to calculate the factorial of a number:
function factorial(n) { // Your code here }
-
Question 11 (Code Snippet):
- Write JavaScript code to create an array containing the numbers from 1 to 5.
ReactJS Open-Ended:
-
Question 12 (Text Field):
- Explain the concept of "props" in React components. Provide an example of how you can pass and use props in a React component.
-
Question 13 (Text Field):
- What is JSX in React, and why is it important? Provide an example of JSX code.
Linux MCQ:
-
Question 14 (MCQ):
- Which Linux command is used to list files and directories in a directory?
- A)
ls
- B)
dir
- C)
list
- D)
show
- A)
- Which Linux command is used to list files and directories in a directory?
-
Question 15 (MCQ):
- What is the purpose of the Linux command
chmod
?- A) Change the current directory
- B) Change the file permissions
- C) Change the user's password
- D) Change the system time
- What is the purpose of the Linux command
Strapi Open-Ended:
-
Question 16 (Text Field):
- Describe the process of creating a custom content type in Strapi. Include the necessary steps and any important configurations.
-
Question 17 (Text Field):
- Explain the role of "Plugins" in a Strapi project. Give an example of a situation where you would use a custom plugin.
HTML Code Snippet:
-
Question 18 (Code Snippet):
- Complete the HTML code to create an ordered list with three list items:
<ol> <!-- Your code here --> </ol>
-
Question 19 (Code Snippet):
- Write HTML and CSS code to create a button with a red background and white text.
JavaScript MCQ:
-
Question 20 (MCQ):
- Which of the following is not a valid way to declare a variable in JavaScript?
- A)
let
- B)
const
- C)
var
- D)
variable
- A)
- Which of the following is not a valid way to declare a variable in JavaScript?
-
Question 21 (MCQ):
- What does the JavaScript
parseInt()
function do?- A) Parse a string into an integer
- B) Print text on the screen
- C) Return the current date and time
- D) Create a new object
- What does the JavaScript
ReactJS Code Snippet:
-
Question 22 (Code Snippet):
- Create a React functional component called "Counter" that displays a button and a count. When the button is clicked, the count should increment by 1.
// Your code here
-
Question 23 (Code Snippet):
- Write React JSX code to create a component that displays a list of items fetched from an API. Use the
fetch()
method to retrieve data.
- Write React JSX code to create a component that displays a list of items fetched from an API. Use the
Linux Open-Ended:
-
Question 24 (Text Field):
- Explain the concept of "file permissions" in Linux. What are the three sets of permissions, and what do they control?
-
Question 25 (Text Field):
- Describe the role of a "shell" in a Linux operating system. Provide an example of a commonly used Linux shell and its features.
Additional questions:
Linux Task: File Permissions
-
Task 26 (Task):
- Imagine you have a file named "secret.txt" in your Linux home directory. Create a sequence of Linux commands to do the following:
- Change the file permissions to make it readable, writable, and executable by the owner.
- Allow read access to the group, but deny write and execute permissions.
- Deny all access to others.
- Imagine you have a file named "secret.txt" in your Linux home directory. Create a sequence of Linux commands to do the following:
Linux MCQ:
-
Question 27 (MCQ):
- What is the purpose of the Linux
grep
command?- A) Rename files
- B) Search for text in files
- C) Copy files between directories
- D) List directory contents
- What is the purpose of the Linux
-
Question 28 (MCQ):
- In Linux, what command is used to display the current working directory?
- A)
dir
- B)
ls
- C)
pwd
- D)
cd
- A)
- In Linux, what command is used to display the current working directory?
Linux Task: Process Management
-
Task 29 (Task):
- Using Linux commands, find and display a list of all running processes on your system. Include their process IDs (PIDs), names, and the amount of memory they are using.
Linux Task: Directory Navigation
-
Task 30 (Task):
- Start from your home directory and navigate to the "Documents" directory using relative and absolute paths. Provide the commands you would use for both methods.
Linux MCQ:
-
Question 31 (MCQ):
- Which command in Linux is used to create a new directory?
- A)
mkdir
- B)
touch
- C)
rmdir
- D)
rm
- A)
- Which command in Linux is used to create a new directory?
-
Question 32 (MCQ):
- In Linux, what does the
cd
command do?- A) Copy a file
- B) Change directory
- C) Display file contents
- D) Delete a file
- In Linux, what does the
Linux Task: File Manipulation
-
Task 33 (Task):
- Create a file named "my_file.txt" in your home directory. Use the Linux command line to add the text "Hello, Linux!" to this file.
Linux Open-Ended:
-
Question 34 (Text Field):
- Explain the purpose and usage of the Linux
tar
command. Provide an example of how to create a compressed archive file usingtar
.
- Explain the purpose and usage of the Linux
Linux Task: User Management
-
Task 35 (Task):
- Create a new user account named "testuser" on your Linux system. Assign it a password and provide it with the necessary permissions to access the "Downloads" directory.