wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Python-Checkpoint revision

Total questions: 21

Worksheet time: 11mins

Name
Class
Date
1.

Which data structure in Python is best suited for storing a collection of items that can be modified, indexed, and allows duplicates?


ما هي بنية البيانات في بايثون الأكثر ملاءمة لتخزين مجموعة من العناصر التي يمكن تعديلها وفهرستها والسماح بالتكرارات؟

a)

List

b)

Tuple

c)

Dictionary

d)

Set

2.

Which Python data structure is most efficient for implementing a queue, allowing for fast insertion and deletion?


ما هي بنية بيانات بايثون الأكثر كفاءة في تنفيذ قائمة الانتظار، مما يسمح بالإدراج والحذف السريع؟

a)

List

b)

Dictionary

c)
  1. Deque

d)

Set

3.

What is the primary difference between a list and a tuple in Python with respect to mutability?


ما هو الفرق الأساسي بين القائمة والصفوف في بايثون فيما يتعلق بالقابلية للتغيير؟

a)
    1. Lists can be modified after creation, while tuples cannot.


b)
    1. Tuples can be modified after creation, while lists cannot.


c)
    1. Both lists and tuples are immutable.


d)
    1. Lists and tuples are identical in terms of mutability.


4.

Which Python data structure is ideal for creating a mapping of unique keys to values for efficient data retrieval?


ما هي بنية بيانات Python المثالية لإنشاء تعيين مفاتيح فريدة للقيم من أجل استرجاع البيانات بكفاءة؟

a)

Set

b)

Tuple

c)
  • Dictionary


d)

List

5.

Which Python data structure is best for storing a collection of unique items without any specific order?


ما هي بنية بيانات بايثون الأفضل لتخزين مجموعة من العناصر الفريدة دون أي ترتيب محدد؟

a)

List

b)

Tuple

c)

Dictionary

d)

Set

6.

What is the primary advantage of using a tuple over a list in Python?


ما هي الميزة الأساسية لاستخدام الصف على القائمة في بايثون؟

a)

Tuples are mutable, while lists are not.

b)

Tuples are faster to access than lists.

c)

Tuples can store duplicate values, while lists cannot.

d)

Tuples allow for dynamic resizing, while lists do not.

7.

Which Python data structure would be most appropriate for implementing a stack that allows for last-in, first-out (LIFO) access to its elements?
ما هي بنية بيانات بايثون الأكثر ملاءمة لتنفيذ وظائف تسمح بالوصول الأخير إلى عناصره (LIFO)؟


a)

Dictionary

b)

List

c)

Tuple

d)

Set

8.

In Python, the use of lists allows for storing and manipulating collections of items with a built-in set of methods for various operations.


في بايثون، يسمح استخدام القوائم بتخزين ومعالجة مجموعات من العناصر باستخدام مجموعة مدمجة من الأساليب لعمليات مختلفة.

a)

True

b)

False

9.

What is the primary advantage of using NumPy arrays over standard Python lists for numerical computations?


ما هي الميزة الأساسية لاستخدام صفائف

NumPy على قوائم Python

القياسية للحسابات الرقمية؟

a)
    1. NumPy arrays are more memory efficient and allow for faster computations.


b)
    1. NumPy arrays can store mixed data types, unlike Python lists.


c)
    1. NumPy arrays automatically resize when new elements are added.


d)
    1. NumPy arrays are easier to read and write than Python lists.


10.

In Python, dictionaries are mutable data structures that allow for the storage of key-value pairs


في بايثون، القواميس هي هياكل بيانات قابلة للتغيير تسمح بتخزين أزواج القيمة الرئيسية

a)

True

b)

False

11.

The use of lists in Python allows for dynamic resizing, meaning they can grow or shrink as needed during program execution.

استخدام القوائم في بايثون يسمح بتغيير الحجم الديناميكي، مما يعني أنها يمكن أن تنمو أو تتقلص حسب الحاجة أثناء تنفيذ البرنامج.


a)

True

b)

False

12.

In Python, a set is a data structure that allows for the storage of unordered collections of unique items.

في لغة بايثون، المجموعة عبارة عن بنية بيانات تسمح بتخزين مجموعات غير مرتبة من العناصر الفريدة.

a)

True

b)

False

13.

The Python programming language does not support a native array data structure, requiring the use of external libraries like NumPy for array functionality.

Pythonلا تدعم لغة البرمجة

بنية بيانات المصفوفة الأصلية، مما يتطلب استخدام مكتبات خارجية مثل

NumPy لوظيفة المصفوفة.

a)

True

b)

False

14.

The use of arrays in Python allows for more efficient memory usage compared to standard lists when handling large datasets.

يتيح استخدام المصفوفات استخدامًا أكثر كفاءة للذاكرة مقارنة بالقوائم القياسية عند التعامل مع مجموعات البيانات الكبيرةPython.في

a)

True

b)

False

15.

In Python, lists and tuples are both immutable data types that can store a collection of items.

في بايثون، تعد القوائم والصفوف من أنواع البيانات غير القابلة للتغيير والتي يمكنها تخزين مجموعة من العناصر.

a)

True

b)

False

16.

Which of the following best describes the process of creating a digital tool to solve a real-world problem using events?

أي مما يلي يصف بشكل أفضل عملية إنشاء أداة رقمية لحل مشكلة حقيقية باستخدام الأحداث؟

a)
    1. Designing a user interface without considering user needs


b)
    1. Writing code that responds to specific actions or inputs to generate desired outcomes


c)
    1. Creating a static webpage that contains no interactive elements

d)
    1. Using algorithms to analyze data without a practical application

17.

The command that will print a line of command on the program is:

الأمر الذي سيطبع سطر الأوامر في البرنامج هو:

a)

echo

b)
  •  

    hey, Alexa

c)

print

d)

speak

18.

Presenting the results back to a user is known as:

يُعرف عرض النتائج مرة أخرى للمستخدم على النحو التالي:

a)

Input

b)

Storage

c)

Output

d)

Processing

19.

In Python, to make remarks that the computer will ignore, we use:

في بايثون، لإبداء ملاحظات سيتجاهلها الكمبيوتر، نستخدم:

a)

@

b)

Rem

c)

Ignore

d)

#

20.

In Python, iteration is another word for a:

في لغة Python، التكرار هو كلمة أخرى تعني:

a)

Variable

b)

Loop

c)

Condition

d)

Function

21.

Which of the following represents a real-world problem that could be effectively addressed by a digital project using computational artefacts?

أي مما يلي يمثل مشكلة حقيقية يمكن معالجتها بشكل فعال من خلال مشروع رقمي باستخدام المصنوعات الحسابية؟

a)
  1. Developing a mobile app to help users track their daily water intake

b)
    1. Creating a new social media platform for sharing photos

c)
  1. Designing a video game based on a popular movie

d)
    1. Building a website for a local restaurant's menu