[miniorange_social_sharing]
[TheChamp-Login]

/40

Final Exam for Python for Everyone (A to Z)

BEST OF LUCK!!!

1 / 40

1.

 Select the correct example of complex datatype in Python

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

2 / 40

2.

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

a. True

b. False

3 / 40

3. Most recent major version of Python is Python 3

4 / 40

4.

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

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

5 / 40

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

6 / 40

6.

What will be the output of above Python code?

str1="6/4"print("str1")

A. 1
B. 6/4
C. 1.5
D. str1

7 / 40

7. Extension of all Python  Programme are .py

8 / 40

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

9 / 40

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

10 / 40

10. Comments can’t be used to prevent execution when testing code.

11 / 40

11. A loop block in python starts with a –

a) ; (semicolon)

b) , (comma)

c) : (colon)

d) # (hash)

12 / 40

12. Indentation refers to the spaces at the beginning of a code line.

13 / 40

13. You can also have an else without the elif

14 / 40

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

15 / 40

15. Comments starts with a #

16 / 40

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

17 / 40

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

18 / 40

18.

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

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

19 / 40

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

20 / 40

20. Which of the following is a Python tuple?
a) [1, 2, 3]
b) (1, 2, 3)
c) {1, 2, 3}
d) {}

21 / 40

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

22 / 40

22. What is the output of the given below program?

if 3 + 4 == 7:    print("Hi")else:    print("Know Program")print("Hello")

a) Hi
b) Know Program

c)
Hi
Hello

d)
Know Program
Hello

23 / 40

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

24 / 40

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

25 / 40

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

26 / 40

26.

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.

27 / 40

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

28 / 40

28.

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

29 / 40

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

30 / 40

30. Variables that are created outside of a function

31 / 40

31.

def cal(n1) : What is n1?

a. Parameter

b. Argument

c. Keyword

d. None of the above

32 / 40

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

33 / 40

33. Python can be install on both  Linux and  Windows

34 / 40

34. Comments can be used to make the code more readable.

35 / 40

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

36 / 40

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

37 / 40

37.

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.

38 / 40

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

39 / 40

39.

 What is output of: 35 == 35.0

  1. False
  2. True
  3. 33
  4. None of the above

40 / 40

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

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.