[miniorange_social_sharing]
[TheChamp-Login]

/40

Final Exam for Python for Everyone (A to Z)

BEST OF LUCK!!!

1 / 40

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

2 / 40

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

3 / 40

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

4 / 40

4. The for loop does not require an indexing variable to set beforehand

5 / 40

5. Python can be install on both  Linux and  Windows

6 / 40

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

7 / 40

7. Python can be used to handle big data and perform complex mathematics.

8 / 40

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

9 / 40

9.

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

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

10 / 40

10.

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

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. Which of the following is the correct extension of the Python file?

13 / 40

13.

Following is an example of ___________________

sv = “csiplearninghub.com”

a. List

b. String

c. Dictionary

d. None of the above

14 / 40

14. Is there any comments in  following codes

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

 

15 / 40

15. Find the output of the given Python program?

a, b, c = 1, 3, 5if a > 0:  if b < 2:    print("Hi")  elif c > 3:    print("Hello")else:  print("Know Program")

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

16 / 40

16.

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

a. True

b. False

17 / 40

17. Extension of all Python  Programme are .py

18 / 40

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

19 / 40

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

20 / 40

20. Python is a  high-level programming language.

21 / 40

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

22 / 40

22. What does the following code print?

x = -10if x < 0:    print("The negative number ",  x, " is not valid here.")print("This is always printed")
a.This is always printedb.The negative number -10 is not valid hereThis is always printedc.The negative number -10 is not valid here

23 / 40

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

24 / 40

24.

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

25 / 40

25.

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

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

26 / 40

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

27 / 40

27. The format() method takes the passed arguments

28 / 40

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

29 / 40

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

30 / 40

30.

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

a. 2

b. 3

c. 5

d. Multiple times

31 / 40

31. A variable name cannot start with a number

32 / 40

32.

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

33 / 40

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

34 / 40

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

35 / 40

35. Comments can be used to explain Python code.

36 / 40

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

37 / 40

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

38 / 40

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

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

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

39 / 40

39.

Which one of the following is the correct extension of the Python file?

  1. .py
  2. .python
  3. .p
  4. None of these

40 / 40

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

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.