[miniorange_social_sharing]
[TheChamp-Login]

/40

Final Exam for Python for Everyone (A to Z)

BEST OF LUCK!!!

1 / 40

1.

Which of the following creates a tuple?

A. tuple1=(“a”,”b”)
B. tuple1[2]=(“a”,”b”)
C. tuple1=(5)*2
D. None of the above

2 / 40

2. 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))

3 / 40

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

4 / 40

4.

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

a. True

b. False

5 / 40

5. Comments starts with a #

6 / 40

6. The length of an array is always one more than the highest array index.

7 / 40

7. Find and write the output of the following python code:

x = “abcdef”

i = “a”

while i in x:

print(i, end = ” “)

a) a

b) a a a a a a

c) a a a a a a … infinite times

d) Code will generate error

8 / 40

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

9 / 40

9.

 What is output of: 35 == 35.0

  1. False
  2. True
  3. 33
  4. None of the above

10 / 40

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

11 / 40

11. A variable name must start with a letter or the underscore character

12 / 40

12.

Following is an example of ___________________

sv = “csiplearninghub.com”

a. List

b. String

c. Dictionary

d. None of the above

13 / 40

13. Comparison operators are not  used to compare two values

14 / 40

14. + operator is used  to get output of multiple variables

15 / 40

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

16 / 40

16.

Which of the following is not a keyword in Python language?

  1. val
  2. raise
  3. try
  4. with

17 / 40

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

18 / 40

18. Which of the following is the correct extension of the Python file?

19 / 40

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

20 / 40

20. Most recent major version of Python is Python 3

21 / 40

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

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. What is another word for ‘iteration’ ?

a) Selection

b) Assignment

c) Sequencing

d) Repetition

24 / 40

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

25 / 40

25. Variable names are case-sensitive

26 / 40

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

27 / 40

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

28 / 40

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

29 / 40

29. Python can be install on both  Linux and  Windows

30 / 40

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

31 / 40

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

32 / 40

32. Python relies on indentation?

33 / 40

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

34 / 40

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

35 / 40

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

36 / 40

36. We can combine strings and numbers by using the format() method

37 / 40

37. You can also have an else without the elif

38 / 40

38. A variable name cannot start with a number

39 / 40

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

40 / 40

40. Extension of all Python  Programme are .py

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.