[miniorange_social_sharing]
[TheChamp-Login]

/40

Final Exam for Python for Everyone (A to Z)

BEST OF LUCK!!!

1 / 40

1. python file can also run on command line

2 / 40

2.

l = [ 4, 8, 9, 2.6, 5 ] is a type of which data type in python?

  1. List
  2. Tuple
  3. Set
  4. None of these

3 / 40

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

4 / 40

4.

How to copy one list to another in python?

A. l1[] = l2[]
B. l1[] = l2
C. l1[] = l2[:]
D. l1 = l2

5 / 40

5.

Which of the following is False?

A. String is immutable.
B. capitalize() function in string is used to return a string by converting the whole given string into uppercase.
C. lower() function in string is used to return a string by converting the whole given string into lowercase.
D. None of these.

6 / 40

6. Camel Case
Each word, except the first, starts with a capital letter:

7 / 40

7. python has two primitive loop commands:

  • while loops
  • for loops

8 / 40

8. Variable names are case-sensitive

9 / 40

9.

Function defined to achieve some task as per the programmer’s requirement is called a ___________

a. user defined function

b. library function

c. built in functions

d. All of the above.

10 / 40

10. To insert characters that are illegal in a string, use an escape character

11 / 40

11.  ________ in Python is a counter-controlled loop.

a) for

b) while

c) Both (a) and (b)

d) None of the above

12 / 40

12. Most recent major version of Python is Python 3

13 / 40

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

14 / 40

14. You can also use the remove() method to remove an element from the array

15 / 40

15.

Choose the correct option with respect to Python.

A. Both tuples and lists are immutable.
B. Tuples are immutable while lists are mutable.
C. Both tuples and lists are mutable.
D. Tuples are mutable while lists are immutable.

16 / 40

16. Which of the following is the use of function in python?
a) Functions are reusable pieces of programs
b) Functions don’t provide better modularity for your application
c) you can’t also create your own functions
d) All of the mentioned

17 / 40

17.

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

18 / 40

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

19 / 40

19. The format() method takes the passed arguments

20 / 40

20.

 Select the correct example of complex datatype in Python

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

21 / 40

21. With the break statement we can stop the loop even if the while condition is true

22 / 40

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

23 / 40

23.

The function can be called in the program by writing function name followed by ____

a. [ ]

b. { }

c. ( )

d. None of the above

24 / 40

24. You can use the append() method to add an element to an array

25 / 40

25. The format() method takes unlimited number of arguments

26 / 40

26. The for loop does not require an indexing variable to set beforehand

27 / 40

27.

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

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

28 / 40

28. Find the output of the following program segments:

for i in range(20,30,2):

print(i)

a) 20 22 24 26 28

b) 20

22

24

26

28

c) 20 22 24 26 28 30

d) 20

22

24

26

28

30

29 / 40

29. What keyword would you use to add an alternative condition to an if statement?

a) else if
b) elseif
c) elif
d) None of the above

30 / 40

30. Python will give you an error if you skip the indentation

31 / 40

31. Python relies on indentation?

32 / 40

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

33 / 40

33. Pascal Case
Each word starts with a capital letter:

34 / 40

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

35 / 40

35. break in Python is used ______________

a) To restart a loop

b) Terminate a loop

c) To jump in between the loop

d) None of the above

36 / 40

36. Python allows you to extract the values into variables.

37 / 40

37.

In Python, a variable may be assigned a value of one type, and then later assigned a value of a different type:

  1. False
  2. True

38 / 40

38.

Which of the following statement is a function call?

a. call sum( )

b. def sum( )

c. sum( )

d. function sum( )

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. Python is an interpreted programming language

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.