[miniorange_social_sharing]
[TheChamp-Login]

/40

Final Exam for Python for Everyone (A to Z)

BEST OF LUCK!!!

1 / 40

1.

Which statement is correct?

A. List is immutable && Tuple is mutable
B. List is mutable && Tuple is immutable
C. Both are Mutable.
D. Both are Immutable

2 / 40

2. Python is an interpreted programming language

3 / 40

3. Operators are used to perform operations on variables and values

4 / 40

4. Which term describes a loop that continues repeating without a terminating (ending) condition?

a) Infinite Loop

b) Conditional Loop

c) Unlimited Loop

d) Sequence Loop

5 / 40

5. What does the following code print?

x = -10if x < 0:    print("The negative number ",  x, " is not valid here.")print("This is always printed")
a.This is always printedb.The negative number -10 is not valid hereThis is always printedc.The negative number -10 is not valid here

6 / 40

6. Bitwise operators are used to compare (binary) numbers

7 / 40

7. Find the output of the given Python program?

a, b, c = 1, 3, 5if a > 0:  if b < 2:    print("Hi")  elif c > 3:    print("Hello")else:  print("Know Program")

a) Hi
b) Hello
c) Know Program
d) Compiled Successfully, No Output.

8 / 40

8. Which of the following is used to define a block of code in Python language?
a) Indentation
b) Key
c) Brackets
d) All of the mentioned

9 / 40

9. Python can be used to handle big data and perform complex mathematics.

10 / 40

10. Python has a set of built-in methods that you can use on lists/arrays

11 / 40

11. With the break statement we can stop the loop before it has looped through all the items

12 / 40

12. Most recent major version of Python is Python 3

13 / 40

13.

What will be the output of below Python code?

str1="poWer"str1.upper()print(str1)

A. POWER
B. Power
C. power
D. poWer

14 / 40

14. Comments can’t be used to prevent execution when testing code.

15 / 40

15. A loop block in python starts with a –

a) ; (semicolon)

b) , (comma)

c) : (colon)

d) # (hash)

16 / 40

16. An example of an illegal character is a double quote inside a string that is surrounded by double quotes

17 / 40

17.

What do we use to define a block of code in Python language?

  1. Key
  2. Brackets
  3. Indentation
  4. None of these

18 / 40

18.

Which of the following statement is a function call?

a. call sum( )

b. def sum( )

c. sum( )

d. function sum( )

19 / 40

19.

Python considered the character enclosed in triple quotes as String.(T/F)

a. True

b. False

20 / 40

20.

 ____________________ can be defined as a named group of instructions that accomplish a specific task when it is invoked/called.

a. Function

b. Datatype

c. Token

d. Operator

21 / 40

21. With the for loop we can execute a set of statements

22 / 40

22.

What will be the output of below Python code?

tupl=([2,3],"abc",0,9)tupl[0][1]=1print(tupl)A. ([2,3],"abc",0,9)B. ([1,3],"abc",0,9)C. ([2,1],"abc",0,9)D. Error

23 / 40

23.

Which of the following precedence order is correct in Python?

  1. Parentheses, Exponential, Multiplication, Division, Addition, Subtraction
  2. Multiplication, Division, Addition, Subtraction, Parentheses, Exponential
  3. Division, Multiplication, Addition, Subtraction, Parentheses, Exponential
  4. Exponential, Parentheses, Multiplication, Division, Addition, Subtraction

24 / 40

24. The len() method to return the length of an array

25 / 40

25.

What is the data type of print(type(0xFF))

26 / 40

26. Extension of all Python  Programme are .py

27 / 40

27. Suppose t = (1, 2, 4, 3), which of the following is incorrect?
a) print(t[3])
b) t[3] = 45
c) print(max(t))
d) print(len(t))

28 / 40

28. Python  was created by Guido van Rossum, and released in 1999.

29 / 40

29. The elif keyword is pythons way of saying “if the previous conditions were not true, then try this condition”.

30 / 40

30. The for loop in Python is an _____________

a) Entry Controlled Loop

b) Exit Controlled Loop

c) Both of the above

d) None of the above

31 / 40

31. Can we write if/else into one line in python?

a) Yes
b) No
c) if/else not used in python
d) None of the above

32 / 40

32. All keywords in Python are in _________
a) Capitalized
b) lower case
c) UPPER CASE
d) None of the mentioned

33 / 40

33. Snake Case
Each word is separated by an underscore character:

34 / 40

34. During Installation Make sure to select both the checkboxes at the bottom .

35 / 40

35. Official site of python is www.python.org

36 / 40

36. A variable name can only contain alpha-numeric characters and
underscores

37 / 40

37. Identity operators are used to compare the objects, not if they are equal, but if they are actually the same object, with the same memory location

38 / 40

38. What is the output of the given below program?

if 1 + 3 == 7:    print("Hello")else:    print("Know Program")

a) Hello
b) Know Program
c) Compiled Successfully, No Output.
d) Error

39 / 40

39. An array can hold many values under a single name

40 / 40

40.

Which keyword is used to begin the definition of a function?

a. Define

b. DEF

c. def

d. Def

Exit



[hurrytimer id=”2250″]
[wooct_product]

Wrong shortcode initialized


You must log in to see your results.



Wrong shortcode initialized


There are no questions atteched yet.





[ays_quiz_leaderboard id=”Your_Quiz_ID” from=”Y-m-d H:i:sa” to=”Y-m-d H:i:s”]

Category:


Wrong shortcode initialized


[WATU 1]

You must log in to see your results.