[miniorange_social_sharing]
[TheChamp-Login]

/40

Final Exam for Python for Everyone (A to Z)

BEST OF LUCK!!!

1 / 40

1.

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

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

2 / 40

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

3 / 40

3. Python can connect to database systems.

4 / 40

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

5 / 40

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

6 / 40

6.

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

a. True

b. False

7 / 40

7.

How to copy one list to another in python?

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

8 / 40

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

9 / 40

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

10 / 40

10.

 Select the correct example of complex datatype in Python

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

11 / 40

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

12 / 40

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

13 / 40

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

14 / 40

14. What is another word for ‘iteration’ ?

a) Selection

b) Assignment

c) Sequencing

d) Repetition

15 / 40

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

16 / 40

16. Is Python code compiled or interpreted?
a) Python code is both compiled and interpreted
b) Python code is neither compiled nor interpreted
c) Python code is only compiled
d) Python code is only interpreted

17 / 40

17. Python has a set of built-in methods that you can use on lists/arrays

18 / 40

18. + operator is used  to get output of multiple variables

19 / 40

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

20 / 40

20. The format() method takes unlimited number of arguments

21 / 40

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

22 / 40

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

23 / 40

23.

 What is output of: 35 == 35.0

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

24 / 40

24.

Which of the following creates a tuple?

A. tuple1=(“a”,”b”)
B. tuple1[2]=(“a”,”b”)
C. tuple1=(5)*2
D. None of the above

25 / 40

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

26 / 40

26.

Which of the following statement is a function call?

a. call sum( )

b. def sum( )

c. sum( )

d. function sum( )

27 / 40

27. Extension of all Python  Programme are .py

28 / 40

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

29 / 40

29. Variables that are created outside of a function

30 / 40

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

31 / 40

31. Find the output of the given Python program?

a = 25if a < 15:    print("Hi")if a <= 30:    print("Hello")else:    print("Know Program")

a) Hi
b) Hello
c) Know Program
d) Compiled Successfully, No Output.

32 / 40

32.  ________ in Python is a counter-controlled loop.

a) for

b) while

c) Both (a) and (b)

d) None of the above

33 / 40

33.

What will be the output of below Python code?

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

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

34 / 40

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

35 / 40

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

36 / 40

36.

 ____________________ can be defined as a named group of instructions that accomplish a specific task when it is invoked/called.

a. Function

b. Datatype

c. Token

d. Operator

37 / 40

37.

Write the output of the following code :

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

a. Weacome

b. Error

c. aWelcome

d. Welcomea

38 / 40

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

39 / 40

39. The format() method takes the passed arguments

40 / 40

40.

Which of the following statements assigns the value 25 to the variable x in Python:

  1. x ← 25
  2. x = 25
  3. x := 25
  4. int x = 25
  5. x << 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.