[miniorange_social_sharing]
[TheChamp-Login]

/40

Final Exam for Python for Everyone (A to Z)

BEST OF LUCK!!!

1 / 40

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

2 / 40

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

3 / 40

3. Is there any comments in  following codes

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

 

4 / 40

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

5 / 40

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

6 / 40

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

7 / 40

7.

Following is an example of ___________________

sv = “csiplearninghub.com”

a. List

b. String

c. Dictionary

d. None of the above

8 / 40

8. You can also have an else without the elif

9 / 40

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

10 / 40

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

11 / 40

11.

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

12 / 40

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

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. What will be the output of the following Python code?

  1. d = {"john":40, "peter":45}
  2. d["john"]

a) 40
b) 45
c) “john”
d) “peter”

15 / 40

15. Python relies on indentation?

16 / 40

16. Variable names are case-sensitive

17 / 40

17.

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.

18 / 40

18.

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

a. [ ]

b. { }

c. ( )

d. None of the above

19 / 40

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

20 / 40

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

21 / 40

21. What is the index value of ‘i’ in string “Learning”

a. 5

b. 3

c. 6

d. 7

22 / 40

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

23 / 40

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

24 / 40

24. python file can also run on command line

25 / 40

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

26 / 40

26. Python is a  high-level programming language.

27 / 40

27. Python is an interpreted programming language

28 / 40

28. Python can connect to database systems.

29 / 40

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

30 / 40

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

31 / 40

31. You can also have multiple else statements on the same line:

32 / 40

32. Variables that are created outside of a function

33 / 40

33. An array is a special variable, which can hold more than one value at a time

34 / 40

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

35 / 40

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

36 / 40

36. A variable name cannot start with a number

37 / 40

37. Strings in python are surrounded by either single quotation marks, or double quotation marks

38 / 40

38. A for loop is used for iterating over a sequence (that is either a list, a tuple, a dictionary, a set, or a string).

39 / 40

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

40 / 40

40.

Which of the following statement is a function call?

a. call sum( )

b. def sum( )

c. sum( )

d. function sum( )

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.