لا تريد أن تفوت شيئا؟

نصائح اجتياز امتحان الشهادة

آخر أخبار الامتحانات ومعلومات الخصم

برعاية وحديثة من قبل خبرائنا

نعم، أرسل لي النشرة الإخبارية

خذ اختبارات أخرى عبر الإنترنت

السؤال #1
What is the expected output of the following snippet?
A. 3correct
B. 1
C. 2
D. the code is erroneous
عرض الإجابة
اجابة صحيحة: A
السؤال #2
Assuming that the following inheritance set is in force, which of the following classes are declared properly? (Select two answers)
A. class Class_4 (D, A) : passcorrect
B. class Class_1(C,D): passcorrect
C. class Class_3(A,C): pass
D. class Class_2(B,D): pass
عرض الإجابة
اجابة صحيحة: AB
السؤال #3
Which of the following statement are true? (Select two answers)
A. Aclosing an open file is performed by the closefile ( ) function
B. Bthe second open ( ) argument describes the open mode and defaults to 'w'
C. Cif open ( ) 's second argument is 'r' the file must exist or open will fail
D. Dif open ( )'s second argument is 'w' and the invocation succeeds, the previous file's content is lost
عرض الإجابة
اجابة صحيحة: CD
السؤال #4
You need data which can act as a simple telephone directory. You can obtain it with the following clauses (choose two relevant variants; assume that no other items have been created before)
A. dir={'Mom':5551234567, 'Dad':5557654321>
B. dir={'Mom':'5551234567', * Dad':'5557654321'}
C. dir={Mom:5551234567, Dad:5557654321}correct
D. dir={Mom:'5551234567', Dad:'5557654321'}correct
عرض الإجابة
اجابة صحيحة: CD
السؤال #5
The following class hierarchy is given . What is the expected out of the code?
A. BB
B. CC
C. AA
D. BCcorrect
عرض الإجابة
اجابة صحيحة: D
السؤال #6
What is the expected output of the following snippet?
A. True lowercorrect
B. True upper
C. False upper
D. False lower
عرض الإجابة
اجابة صحيحة: A
السؤال #7
What will the value of the i variable be when the following loop finishes its execution?
A. 10
B. the variable becomes unavailable
C. 11
D. 9
عرض الإجابة
اجابة صحيحة: D
السؤال #8
Which of the following statement are true? (Select two answers)
A. closing an open file is performed by the closefile ( ) functioncorrect
B. the second open ( ) argument describes the open mode and defaults to ‘w’
C. if open ( ) ‘s second argument is ‘r’ the file must exist or open will failcorrect
D. if open ( )’s second argument is ‘w’ and the invocation succeeds, the previous file’s content is lostcorrect
عرض الإجابة
اجابة صحيحة: ACD
السؤال #9
If you need a function that does nothing, what would you use instead of XXX? (Select two answers) def idler ( ): XXX
A. passcorrect
B. return
C. exit
D. None
عرض الإجابة
اجابة صحيحة: A
السؤال #10
What is the expected behavior of the following code?
A. It outputs Falsecorrect
B. It outputs nothing
C. It outputs True
D. It raises an exception
عرض الإجابة
اجابة صحيحة: A
السؤال #11
What is the expected behavior of the following code?
A. the code is erroneus and it will not execute
B. it outputs [2, 4]
C. it outputs [4, 2]correct
D. it outputs [0, 1, 2, 3, 4]
عرض الإجابة
اجابة صحيحة: C
السؤال #12
Assuming that the following piece of code has been executed successfully, which of the expressions evaluate to True? (Select two answers)
A. obj_b
B. hasattr(obj_b, 'prop_aa')correct
C. isinstance(obj_c,A)correct
D. VarA == 3
عرض الإجابة
اجابة صحيحة: BC
السؤال #13
Which of the following expression evaluate to True? (Select two answers) A) B) C) D)
A. Option Acorrect
B. Option B
C. Option Ccorrect
D. Option Dcorrect
عرض الإجابة
اجابة صحيحة: ACD
السؤال #14
What is the expected behavior of the following code?
A. it outputs 2
B. the code is erroneous and it will not execute
C. it outputs 3
D. it outputs :correct
عرض الإجابة
اجابة صحيحة: D
السؤال #15
What is true about Python packages? (Select two answers)
A. the__name__variable content determines the way in which the module was runcorrect
B. a package can be stored as a tree of sub-directories/sub-folderscorrect
C. __pycache__is the name of a built-in variablecorrect
D. hashbang is the name of a built-in Python function
عرض الإجابة
اجابة صحيحة: ABC
السؤال #16
What is the expected output of the following snippet?
A. abccorrect
B. The code will cause a runtime exceptioncorrect
C. ABC
D. 123
عرض الإجابة
اجابة صحيحة: AB
السؤال #17
Which of the following statements are true? (Select two answers)
A. Python strings are actually listscorrect
B. Python strings can be concatenatedcorrect
C. Python strings can be sliced like listscorrect
D. Python strings are mutable
عرض الإجابة
اجابة صحيحة: ABC
السؤال #18
What is the expected output of the following code if there is no file named non existing_file inside the working directory?
A. 2 2correct
B. 1 3
C. 1 2 3
D. 2 2 3
عرض الإجابة
اجابة صحيحة: A
السؤال #19
What is the expected out of the following code of the file named zero_length_existing_file is a zero-length file located inside the working directory?
A. 0
B. -1correct
C. an errno value corresponding to file not found
D. 2
عرض الإجابة
اجابة صحيحة: B
السؤال #20
The first parameter of each method:
A. holds a reference to the currently processed object
B. is always set to None
C. is set to a unique random value
D. is set by the first argument's valuecorrect
عرض الإجابة
اجابة صحيحة: D
السؤال #21
What is a true about python class constructors? (Select two answers)
A. the constructor must have at least one parametercorrect
B. the constructor must return a value other than None
C. the constructor is a method named_init_correct
D. there can the more than one constructor in a Python class
عرض الإجابة
اجابة صحيحة: AC
السؤال #22
What is the expected behavior of the following code?
A. It outputs Falsecorrect
B. It outputs nothing
C. It outputs True
D. It raises an exception
عرض الإجابة
اجابة صحيحة: A
السؤال #23
Assuming that the code below has been executed successfully, which of the following expressions will always evaluate to True? (Choose two.) import random v1 = random.random() v2 = random.random()
A. len(random
B. v1 == v2
C. random
D. v1>1
عرض الإجابة
اجابة صحيحة: BC
السؤال #24
What is true about Python class constructors? (Select two answers)
A. the constructor's first parameter identifies an object currently being createdcorrect
B. the constructor cannot use the default values of the parameters
C. the constructor can be invoked directly under strictly defined circumstances
D. super-class constructor is invoked implicitly during constructor execution
عرض الإجابة
اجابة صحيحة: A
السؤال #25
What is the expected behavior of the following code?
A. it outputs 1correct
B. it outputs 0
C. it raises an exception
D. it outputs 2
عرض الإجابة
اجابة صحيحة: A
السؤال #26
Which of the following snippets will execute without raising any unhandled exceptions? (Select answers) A)
A. Option A
B. Option Bcorrect
C. Option Ccorrect
D. Option Dcorrect
عرض الإجابة
اجابة صحيحة: BCD
السؤال #27
Which of the following statements are true? (Select two answers)
A. open () requires a second argument
B. open () is a function which returns an object that represents a physical file
C. instd, outstd, errstd are the names of pre-opened streams
D. if invoking open () fails, an exception is raisedcorrect
عرض الإجابة
اجابة صحيحة: D
السؤال #28
What is true about Python packages? (Select two answers)
A. the sys
B. _pycache_is a folder that stores semi-completed Python modulescorrect
C. a package contents can be stored and distributed as an mp3 file
D. a code designed to initialize a package's state should be placed inside a file named init
عرض الإجابة
اجابة صحيحة: AB
السؤال #29
Can a module run like regular code?
A. yes, and it can differentiate its behavior between the regular launch and import
B. it depends on the Python version
C. yes, but it cannot differentiate its behavior between the regular launch and import
D. no
عرض الإجابة
اجابة صحيحة: A
السؤال #30
A class constructor (Select two answers)
A. can return a valuecorrect
B. cannot be invoked directly from inside the classcorrect
C. can be invoked directly from any of the subclassescorrect
D. can be invoked directly from any of the superclasses
عرض الإجابة
اجابة صحيحة: ABC

View The Updated Python Exam Questions

SPOTO Provides 100% Real Python Exam Questions for You to Pass Your Python Exam!

عرض الإجابات بعد التقديم

يرجى إرسال البريد الإلكتروني الخاص بك والواتس اب للحصول على إجابات الأسئلة.

ملحوظة: يرجى التأكد من صلاحية معرف البريد الإلكتروني وWhatsApp حتى تتمكن من الحصول على نتائج الاختبار الصحيحة.

بريد إلكتروني:
رقم الواتس اب/الهاتف: