[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 considered the character enclosed in triple quotes as String.(T/F)

a. True

b. False

3 / 40

3. The else keyword catches anything which isn’t caught by the preceding conditions.

4 / 40

4. The list’s remove() method only removes the first occurrence of the specified value.

5 / 40

5. Python has various versions available

6 / 40

6.

Following is an example of ___________________

sv = “csiplearninghub.com”

a. List

b. String

c. Dictionary

d. None of the above

7 / 40

7. Python is a  high-level programming language.

8 / 40

8. 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

9 / 40

9.

Which is the correct operator for power(xy)?

  1. X^y
  2. X**y
  3. X^^y
  4. None of the mentioned

10 / 40

10. A variable name cannot start with a number

11 / 40

11. You have to use the same number of spaces in the same block of code, otherwise Python will give you an error

12 / 40

12. Python can be install on both  Linux and  Windows

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. Comparison operators are not  used to compare two values

15 / 40

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

16 / 40

16. What will be the output of the following Python code?

i = 1while True:    if i%3 == 0:        break    print(i)     i + = 1

a) 1 2
b) 1 2 3
c) error
d) none of the mentioned

17 / 40

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

18 / 40

18. You can use the pop() method to remove an element from the array

19 / 40

19. Which of the following is a Python tuple?
a) [1, 2, 3]
b) (1, 2, 3)
c) {1, 2, 3}
d) {}

20 / 40

20. Python relies on indentation?

21 / 40

21. Pip is  not a powerful package management system for Python software packages

22 / 40

22.

 Which of the following statement is False?

  1. Variable names can be arbitrarily long.
  2. They can contain both letters and numbers.
  3. Variable name can begin with underscore.
  4. Variable name can begin with number.

23 / 40

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

24 / 40

24. When does the else statement written after loop executes?

a) When loop condition becomes false

b) When break statement is executed in the loop

c) else statement is always executed

d) None of the above

25 / 40

25. Python can be used on a server to create web applications?

26 / 40

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

27 / 40

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

28 / 40

28.

 Select the correct example of complex datatype in Python

  1. 3 + 2j
  2. -100j
  3. 5j
  4. All of the above are correct

29 / 40

29.

Which of the following statement is a function call?

a. call sum( )

b. def sum( )

c. sum( )

d. function sum( )

30 / 40

30. print() function is often used to output variables.

31 / 40

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

32 / 40

32. Comments can be used to explain Python code.

33 / 40

33. Arithmetic operators are used with numeric values to perform common mathematical operations

34 / 40

34. What is another word for ‘iteration’ ?

a) Selection

b) Assignment

c) Sequencing

d) Repetition

35 / 40

35. Indentation refers to the spaces at the beginning of a code line.

36 / 40

36. What will be the output of the following Python code?

x = ['ab', 'cd']for i in x:    i.upper()print(x)

a) [‘ab’, ‘cd’]
b) [‘AB’, ‘CD’]
c) [None, None]
d) none of the mentioned

37 / 40

37. To write and execute code in python, we first need to install Python on our system

38 / 40

38. A loop block in python starts with a –

a) ; (semicolon)

b) , (comma)

c) : (colon)

d) # (hash)

39 / 40

39.

The most important object defined in NumPy is an N-dimensional array type called?

A. ndarray
B. narray
C. nd_array
D. darray

40 / 40

40.

In a program, a function can be called ____________ times.

a. 2

b. 3

c. 5

d. Multiple times

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.