wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

نادي البرمجة ضواحي القدس م4

Total questions: 13

Worksheet time: 6mins

Name
Class
Date
1.

قيمة المعادلة التالية X=2+3 في لغة بايثون

a)

5

b)

10

c)

16

2.

يستخدم أمر

if

في لغة بايثون ل

a)

الإدخال

b)

الطباعة

c)

الجمل الشرطية

3.

يمكن داخل بايثون تنزيل مكتبات اضافية وتثبيتها لاضافة دوال اخرى قد نحتاجها في برامج اخرى

a)

True

b)

False

4.

ما هو ناتج مهمة القائمة التالية

aList = [4, 8, 12, 16]

aList[1:4] = [20, 24, 28]

print(aList)

a)

[4, 20, 24, 28, 8, 12, 16]

b)

[4, 20, 24, 28]

5.

Select all the correct options to join two lists in Python

listOne = ['a', 'b', 'c', 'd']

listTwo = ['e', 'f', 'g']

a)

newList = listOne + listTwo

b)

newList = extend(listOne, listTwo)

c)

newList = listOne.extend(listTwo)

d)

newList.extend(listOne, listTwo)

6.

Which of the following would give an error?

a)

list1=[]

b)

list1=[]*3

c)

list1=[2,8,7]

d)

None of the above

7.

أي مما يلي سيعطي الناتج كـ [23,2,9,75] ?

If list1=[6,23,3,2,0,9,8,75]

a)

print(list1[1:7:2])

b)

print(list1[0:7:2])

c)

print(list1[1:8:2])

d)

print(list1[0:8:2])

8.

nameList = ["John", "Harry", "Jesse", "John", "Marry", "Larry"]

print(nameList.count("John"))

What would be the output

a)

1

b)

2

c)

3

d)

Error

9.

Which of the options is the correct syntax for creating lists?

a)

< >

b)

“ ”

c)

[ ]

10.

تسمح Python بالفهرسة السلبية لتسلسلاتها. ما هو الفهرس الذي يشير إلى العنصر الأخير؟

a)

-2

b)

-4

c)

-1

11.

أين سيتم وضع العناصر الجديدة في القائمة؟

a)

In the middle of the list

b)

At the end of the list

c)

At the beginning of the list

12.

هل يمكن أن تحتوي قائمة مفهرسة على تكرارات؟

a)

Yes

b)

No

c)

There is no right answer.

13.

هل يمكن أن تحتوي القائمة على عناصر ذات أنواع مختلفة؟ (عدد صحيح ، سلسلة ...)

a)

No

b)

There is no right answer

c)

Yes