[miniorange_social_sharing]
[TheChamp-Login]

/40

Final Exam for Python for Everyone (A to Z)

BEST OF LUCK!!!

1 / 40

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

2 / 40

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

3 / 40

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

4 / 40

4.

What is the value of the expression 100 / 25?

  1. 4
  2. 4.0
  3. 0
  4. 25

5 / 40

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

6 / 40

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

7 / 40

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

8 / 40

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

9 / 40

9. Python has various versions available

10 / 40

10. The format() method takes the passed arguments

11 / 40

11.

 Select the correct example of complex datatype in Python

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

12 / 40

12. You can also have an else without the elif

13 / 40

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

14 / 40

14.

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

a. 2

b. 3

c. 5

d. Multiple times

15 / 40

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

16 / 40

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

17 / 40

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

18 / 40

18.

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

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

19 / 40

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

20 / 40

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

21 / 40

21. Python has syntax that allows developers to write programs with fewer lines than some other programming languages.

22 / 40

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

23 / 40

23.

In the Python statement x = a + 5 – b:

a and b are ________a + 5 - b is ________
  1. terms, a group
  2. operators, a statement
  3. operands, an expression
  4. operands, an equation

24 / 40

24. Comments starts with a #

25 / 40

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

26 / 40

26.

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.

27 / 40

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

28 / 40

28. Which of the following loop is not supported by the python programming language?

a) for loop

b) while loop

c) do…while loop

d) None of the above

29 / 40

29. Variable names are case-sensitive

30 / 40

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

31 / 40

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

32 / 40

32.

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

33 / 40

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

34 / 40

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

35 / 40

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

36 / 40

36. if statements cannot be empty, but if you for some reason have an if statement with no content, put in the pass statement to avoid getting an error

37 / 40

37. Python relies on indentation?

38 / 40

38. Extension of all Python  Programme are .py

39 / 40

39. python file can also run on command line

40 / 40

40.

What will be the output of below Python code?

str1="poWer"str1.upper()print(str1)

A. POWER
B. Power
C. power
D. poWer

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.