[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 statement is a function call?

a. call sum( )

b. def sum( )

c. sum( )

d. function sum( )

2 / 40

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

3 / 40

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

4 / 40

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

5 / 40

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

6 / 40

6. Python relies on indentation?

7 / 40

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

8 / 40

8. A variable name cannot start with a number

9 / 40

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

10 / 40

10. You can use three double quotes only:

a = “””Lorem ipsum dolor sit amet,
consectetur adipiscing elit,
sed do eiusmod tempor incididunt
ut labore et dolore magna aliqua.”””
print(a)

11 / 40

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

12 / 40

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

13 / 40

13. Which of the following is used to define a block of code in Python language?
a) Indentation
b) Key
c) Brackets
d) All of the mentioned

14 / 40

14. What will be the output of the following Python code?

x = ['ab', 'cd']for i in x:    i.upper()print(x)

a) [‘ab’, ‘cd’]
b) [‘AB’, ‘CD’]
c) [None, None]
d) none of the mentioned

15 / 40

15.

Following is an example of ___________________

sv = “csiplearninghub.com”

a. List

b. String

c. Dictionary

d. None of the above

16 / 40

16.

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

17 / 40

17. An array can hold many values under a single name

18 / 40

18.

What will the below Python code will return?

If str1="save paper,save plants"str1.find("save")

A. It returns the first index position of the first occurance of “save” in the given string str1.
B. It returns the last index position of the last occurance of “save” in the given string str1.
C. It returns the last index position of the first occurance of “save” in the given string str1.
D. It returns the first index position of the first occurance of “save” in the given string str1.

19 / 40

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

20 / 40

20.

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

21 / 40

21. Which of the following character is used to give single-line comments in Python?
a) //
b) #
c) !
d) /*

22 / 40

22. Python can be install on both  Linux and  Windows

23 / 40

23. The else keyword catches anything which isn’t caught by the preceding conditions.

24 / 40

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

25 / 40

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

26 / 40

26. A loop block in python starts with a –

a) ; (semicolon)

b) , (comma)

c) : (colon)

d) # (hash)

27 / 40

27. Arrays are used to store multiple values in one single variable.

28 / 40

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

29 / 40

29.

Which function overloads the >> operator?

  1. more()
  2. gt()
  3. ge()
  4. None of the above

30 / 40

30. Python is an interpreted programming language

31 / 40

31. Which keyword is used for function?
a) Fun
b) Define
c) Def
d) Function

32 / 40

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

33 / 40

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

34 / 40

34.

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

a. 2

b. 3

c. 5

d. Multiple times

35 / 40

35.

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

36 / 40

36. Which term describes a loop that continues repeating without a terminating (ending) condition?

a) Infinite Loop

b) Conditional Loop

c) Unlimited Loop

d) Sequence Loop

37 / 40

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

38 / 40

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

39 / 40

39. Python can connect to database systems.

40 / 40

40.

How to copy one list to another in python?

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

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.