Python Lists and Loops Practice Questions PDF - Al Falah Education

Summary

This document contains practice questions on Python programming, focusing on lists, loops, and data science concepts. It includes multiple-choice, fill-in-the-blanks, and short answer questions designed to test understanding of key programming principles. This is suitable for Grade VIII students, covering data science, understanding, loops, and other fundamentals.

Full Transcript

Okay, here is the conversion of the provided pages into a structured markdown. ## Chapter 6: Lists and Loops in Python ### Grade VIII **A. Write (T) for True or (F) for False statements.** 1. The for loop is a condition-controlled loop. **(F)** 2. Loops are used to execute the instructions sev...

Okay, here is the conversion of the provided pages into a structured markdown. ## Chapter 6: Lists and Loops in Python ### Grade VIII **A. Write (T) for True or (F) for False statements.** 1. The for loop is a condition-controlled loop. **(F)** 2. Loops are used to execute the instructions several times. **(T)** 3. The continue statement is used to terminate the loop. **(F)** 4. The while loop is a condition-controlled loop. **(T)** **B. Fill in the blanks.** 1. The `While` loop is used when we do not know how many times the loop will execute. 2. A `condition-controlled (While)` loop executes the loop body till a condition is true. 3. The `range()` function in python is used to generate a sequence of numbers. 4. The `break` statement is used to exit a loop in between based on a condition. **C. Multiple Choice Questions.** 1. Which one of the following is a valid Python while statement? * a) While(n>=2) * b) while(n>=2): ✓ * c) While n>=2: * d) None 2. Which of the following is not a loop? * a) for * b) while * c) break✓ * d) None 3. Which of the following is used to terminate the loop? * a) range() * b) break✓ * c) continue * d) none 4. Which of the following is a counter-controlled loop? * a) for✓ * b) .break * c) while * d) None **D. Question and Answers:** 1. What is a loop? * A loop is a program structure which is used to contain one or more instructions to be executed repeatedly. Each execution of the loop is called an iteration using loops. 2. What is counter-controlled loop? * A counter-controlled loop executes the loop body for a fixed number of times decided by a variable which is called a counter variable. This variable is incremented or decremented after each iteration of the loop and when it reaches a certain value, the loop execution stops. Example: for loop. 3. What is condition-controlled loop? * A condition-controlled loop executes the loop body till the condition is true and stops when it becomes false. Example: While 4. Why continue statement is used in a program? * The 'continue' statement is used to continue to the next iteration without executing the remaining statements in the loop. It is used when you want to skip the execution of a particular iteration of the loop. **E. Match the following:** | | | | :---- | :---------- | | 1. insert() | ii) inserts an element at the given index in the list (1) | | 2. append() | i) adds an item into the list at end of the list (2) | | 3. remove() | iv) removes an item from the list (3) | | 4. clear() | iii) removes all items from the list (4) | ## Chapter 7: Data Science ### Grade VIII **A. Fill in the blanks.** 1. `Data Science` is the study that deals with huge volume of data. 2. `Data Scientist` are data professionals who have the technical ability to analyse big data. 3. In `Capture` stage raw and unstructured data is gathered. 4. Banking and Financial institutions use data science for detecting `fraudulent transactions`. **B. Write True or False:** 1. Data science is used in manipulating data. **(T)** 2. Data science helps in decision making. **(T)** 3. Data science provide high security of data. **(F)** 4. Data science uses machine learning algorithms to create predictive models. **(T)** **C. Multiple Choice Questions.** 1. Data Science help with _________ * a) Speech recognition * b) Fraud Detection * c) Image recognition * d) All of the above✔ 2. Data science uses complex _________ to create predictive models. * a) Machine learning Algorithm✔ * b) Program * c) Both a & b * d) None 3. Which of the following is the most important language for Data Sceince? * a) JAVA * b) Ruby * c) R✔ * d) None **D. Question and Answers:** 1. What is data science? * Data Science is the study that deals with huge volume of data. It uses modern tools and techniques to find meaningful information and make business decisions. 2. Who is data scientist? * Data Scientist are data professionals who have the technical ability to analyse big data. 3. Write any two disadvantages of data science. * Two disadvantages of data science are: * *Data Privacy:* Data boosts productivity and revenue by supporting smart business decisions. However, misuse of data can harm organizations and individuals, making data security a major concern in data science. * *Cost:* Data science tools are expensive, often require training, and need careful selection to ensure accurate data analysis, making them challenging to use effectively. 4. Write any two examples of data science. * Two examples of data science are: * *Healthcare:* Machine learning models and other data science components are used by hospitals and other healthcare providers to automate X-Ray analysis and assist doctors in diagnosing illness and planning treatments. * *Retail:* Retailers evaluate client behaviour and purchasing trends in order to individualised product suggestions as well as targeted advertising, marketing and promotions. 5. Explain various advantages of data science. * Some of the advantages of data science are: * *Multiple Career Opportunities:* Being in demand, it has created large number of career opportunities in its various fields. Some of them are Data Scientist, Data Analyst, Research Analyst, Business Analyst, Analytics Manager, Big Data Engineer, etc. * *Business Benefits:* Data Science helps organizations to know how and when their products sell best and that's why the products are delivered always to the right place and at right time. * *Time Reduction:* It helps in delivering new trends faster by processing large amounts data in very short period of time. * *Supports Decision Making:* Data science also help in decision making process. With the help of machine learning algorithms, better decisions can be made. 6. Explain various stages of data science. * Following are the five main stages of data science. * *Capture:* In this stage, raw and unstructured data is collected * *Maintain:* In this stage, the collected data is presented in the required format for analysis. * *Process:* After presenting the data in the required format, data scientists use the prepared data and examine its patterns and ranges to determine how useful it for predictive analytics. * *Analyze:* In this stage, data scientists perform various analysis on the data. * *Communicate:* In the final stage, data scientists present the analysed data in easily readable for such as charts, graphs, and reports. ## Chapter 8: Understanding Cyber Threats & Safety ### Grade VIII **A. Multiple Choice Questions:** 1. In which of these a person is continually chased/followed by another person or a group of various people? * (a) Identity Theft * (b) Stalking✓ * (c) Bullying * (d) Phishing 2. Which of the following is considered as the unsolicited commercial email? * (a) Virus * (b) Malware * (c) Spam✓ * (d) All of the above 3. Which of the following is not a malware? * (a) Virus * (b) Worm * (c) Trojan * (d) None✓ 4. Which of the following is used to detect and remove viruses? * (a) Antivirus✓ * (b) Phishing * (c) Juice Jacking * (d) All of the above **B. Question and Answers** 1. What is Cyber Safety? * Cyber Safety refers to the safe and responsible use of information and communication technologies, such as the internet, social media, online games, smartphones, tablets, and other connected devices. 2. What is a virus? * A virus is a type of computer software that has the ability to spread throughout a computer system. Once a virus has entered the computer system, it can spread to other computers, impairing their ability to function. Data on a computer can be corrupted or deleted by a computer virus. 3. What is malware? * Malware is a type of malicious software designed to gain unauthorized access or to cause damage to a computer without the knowledge of the owner. 4. What is Cyberbullying? * Cyberbullying refers to the usage of the internet and related sources to cause deliberate harm to people. 5. What is Cyberstalking? * Cyberstalking is a type of cybercrime that uses the internet and technology to harass or stalk a person. 6. List various forms of cyberbullying. * Sending/sharing nasty, hurtful, or abusive messages or email. * Humiliating others by posting/sharing embarrassing videos or images. * Spreading rumours or lies online * Setting up fake online profiles. * Repeated harassment and threatening messages. 7. What is antivirus? * Antivirus is a software that is used to detect, prevent and remove virus from a computer. It helps to perform the following tasks: * Scan computers for viruses * Detect any malicious program * Scan emails 8. What are the various ways to safely browse the web? * Keep software updated, especially antivirus software. * Don't share any personal information online. * Don't share passwords. * Don't post photos or videos online. * Be cautious when making online friends. * Don't buy anything online without verifying the authenticity of the site or seller. * Be careful when downloading any attachments.

Use Quizgecko on...
Browser
Browser