[miniorange_social_sharing]
[TheChamp-Login]

/40

Final Exam for Python for Everyone (A to Z)

BEST OF LUCK!!!

1 / 40

1. Variable names are case-sensitive

2 / 40

2.

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

3 / 40

3.

 Select the correct example of complex datatype in Python

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

4 / 40

4.

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

a. True

b. False

5 / 40

5.

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

6 / 40

6.

Which one of the following is the correct extension of the Python file?

  1. .py
  2. .python
  3. .p
  4. None of these

7 / 40

7.

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

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

8 / 40

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

a) for

b) while

c) Both (a) and (b)

d) None of the above

9 / 40

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

10 / 40

10. You can return a range of characters by using the slice syntax

11 / 40

11. Python is a  high-level programming language.

12 / 40

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

13 / 40

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

14 / 40

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

15 / 40

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

16 / 40

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

17 / 40

17. Python relies on indentation?

18 / 40

18. You can have if statements inside if statements, this is called nested if statements.

19 / 40

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

20 / 40

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

21 / 40

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

22 / 40

22. Extension of all Python  Programme are .py

23 / 40

23. Find the output of the given Python program?

a = 25if a < 15:    print("Hi")if a <= 30:    print("Hello")else:    print("Know Program")

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

24 / 40

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

25 / 40

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

26 / 40

26. Python can be install on both  Linux and  Windows

27 / 40

27. Is there any comments in  following codes

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

 

28 / 40

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

29 / 40

29. What is another word for ‘iteration’ ?

a) Selection

b) Assignment

c) Sequencing

d) Repetition

30 / 40

30. Comparison operators are not  used to compare two values

31 / 40

31. A variable name cannot start with a number

32 / 40

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

33 / 40

33.

How to copy one list to another in python?

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

34 / 40

34. Python can be treated in a procedural way, an object-oriented way or a functional way.

35 / 40

35. Python is an interpreted programming language

36 / 40

36. Variables that are created outside of a function

37 / 40

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

38 / 40

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

39 / 40

39. Which of the following is False regarding loops in Python?

a)Loops are used to perform certain tasks repeatedly.

b) while loop is used when multiple statements are to executed repeatedly until the given condition becomes true.

c) while loop is used when multiple statements are to executed repeatedly until the given condition becomes false.

d) for loop can be used to iterate through the elements of lists.

40 / 40

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

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.