Font size
Worksheetsنادي البرمجة ضواحي القدس م4
Total questions: 13
Worksheet time: 6mins
قيمة المعادلة التالية X=2+3 في لغة بايثون
5
10
16
يستخدم أمر
if
في لغة بايثون ل
الإدخال
الطباعة
الجمل الشرطية
يمكن داخل بايثون تنزيل مكتبات اضافية وتثبيتها لاضافة دوال اخرى قد نحتاجها في برامج اخرى
True
False
ما هو ناتج مهمة القائمة التالية
aList = [4, 8, 12, 16]
aList[1:4] = [20, 24, 28]
print(aList)
[4, 20, 24, 28, 8, 12, 16]
[4, 20, 24, 28]
Select all the correct options to join two lists in Python
listOne = ['a', 'b', 'c', 'd']
listTwo = ['e', 'f', 'g']
newList = listOne + listTwo
newList = extend(listOne, listTwo)
newList = listOne.extend(listTwo)
newList.extend(listOne, listTwo)
Which of the following would give an error?
list1=[]
list1=[]*3
list1=[2,8,7]
None of the above
أي مما يلي سيعطي الناتج كـ [23,2,9,75] ?
If list1=[6,23,3,2,0,9,8,75]
print(list1[1:7:2])
print(list1[0:7:2])
print(list1[1:8:2])
print(list1[0:8:2])
nameList = ["John", "Harry", "Jesse", "John", "Marry", "Larry"]
print(nameList.count("John"))
What would be the output
1
2
3
Error
Which of the options is the correct syntax for creating lists?
< >
“ ”
[ ]
تسمح Python بالفهرسة السلبية لتسلسلاتها. ما هو الفهرس الذي يشير إلى العنصر الأخير؟
-2
-4
-1
أين سيتم وضع العناصر الجديدة في القائمة؟
In the middle of the list
At the end of the list
At the beginning of the list
هل يمكن أن تحتوي قائمة مفهرسة على تكرارات؟
Yes
No
There is no right answer.
هل يمكن أن تحتوي القائمة على عناصر ذات أنواع مختلفة؟ (عدد صحيح ، سلسلة ...)
No
There is no right answer
Yes
