[miniorange_social_sharing]
[TheChamp-Login]

/40

Final Exam for Python for Everyone (A to Z)

BEST OF LUCK!!!

1 / 40

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

2 / 40

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

3 / 40

3.

Following is an example of ___________________

sv = “csiplearninghub.com”

a. List

b. String

c. Dictionary

d. None of the above

4 / 40

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

5 / 40

5. Python has various versions available

6 / 40

6.

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

7 / 40

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

8 / 40

8.

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

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

9 / 40

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

10 / 40

10. Which of the following is the use of function in python?
a) Functions are reusable pieces of programs
b) Functions don’t provide better modularity for your application
c) you can’t also create your own functions
d) All of the mentioned

11 / 40

11.

Function defined to achieve some task as per the programmer’s requirement is called a ___________

a. user defined function

b. library function

c. built in functions

d. All of the above.

12 / 40

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

13 / 40

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

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.

Which of the following precedence order is correct in Python?

  1. Parentheses, Exponential, Multiplication, Division, Addition, Subtraction
  2. Multiplication, Division, Addition, Subtraction, Parentheses, Exponential
  3. Division, Multiplication, Addition, Subtraction, Parentheses, Exponential
  4. Exponential, Parentheses, Multiplication, Division, Addition, Subtraction

16 / 40

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

17 / 40

17. Python is an interpreted programming language

18 / 40

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

19 / 40

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

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

a) 1 2
b) 1 2 3
c) error
d) none of the mentioned

20 / 40

20. Extension of all Python  Programme are .py

21 / 40

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

22 / 40

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

23 / 40

23. Comments can be used to explain Python code.

24 / 40

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

25 / 40

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

26 / 40

26.

What is the data type of print(type(10))

27 / 40

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

28 / 40

28.

The most important object defined in NumPy is an N-dimensional array type called?

A. ndarray
B. narray
C. nd_array
D. darray

29 / 40

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

30 / 40

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

31 / 40

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

32 / 40

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

33 / 40

33. 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”

34 / 40

34.

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.

35 / 40

35.

Write the output of the following code :

str = "Welcome"str[2] = 'a'print(str)

a. Weacome

b. Error

c. aWelcome

d. Welcomea

36 / 40

36. To write and execute code in python, we first need to install Python on our system

37 / 40

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

38 / 40

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

39 / 40

39.

Which of the following is False?

A. String is immutable.
B. capitalize() function in string is used to return a string by converting the whole given string into uppercase.
C. lower() function in string is used to return a string by converting the whole given string into lowercase.
D. None of these.

40 / 40

40.

What is the value of the expression 100 / 25?

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

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.