[miniorange_social_sharing]
[TheChamp-Login]

/40

Final Exam for Python for Everyone (A to Z)

BEST OF LUCK!!!

1 / 40

1. Is there any comments in  following codes

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

 

2 / 40

2.

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.

3 / 40

3.

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

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

4 / 40

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

5 / 40

5. The format() method takes the passed arguments

6 / 40

6. Who developed Python Programming Language?

7 / 40

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

8 / 40

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

9 / 40

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

10 / 40

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

11 / 40

11. An array is a special variable, which can hold more than one value at a time

12 / 40

12. Most recent major version of Python is Python 3

13 / 40

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

14 / 40

14. Python is a  high-level programming language.

15 / 40

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

16 / 40

16.

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

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

17 / 40

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

18 / 40

18. Python  was created by Guido van Rossum, and released in 1999.

19 / 40

19.

What will be the output of below Python code?

str1="Information"print(str1[2:8])

A. format
B. formatio
C. orma
D. ormat

20 / 40

20.

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

a. True

b. False

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. You can also have multiple else statements on the same line:

23 / 40

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

24 / 40

24.

Which of the following statement is a function call?

a. call sum( )

b. def sum( )

c. sum( )

d. function sum( )

25 / 40

25.

What is the value of the expression 100 / 25?

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

26 / 40

26. Bitwise operators are used to compare (binary) numbers

27 / 40

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

28 / 40

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

29 / 40

29. When does the else statement written after loop executes?

a) When loop condition becomes false

b) When break statement is executed in the loop

c) else statement is always executed

d) None of the above

30 / 40

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

31 / 40

31.

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.

32 / 40

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

33 / 40

33. Python has various versions available

34 / 40

34. Comments starts with a #

35 / 40

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

36 / 40

36.

def cal(n1) : What is n1?

a. Parameter

b. Argument

c. Keyword

d. None of the above

37 / 40

37. Find and write the output of the following python code:

x = “abcdef”

i = “a”

while i in x:

print(i, end = ” “)

a) a

b) a a a a a a

c) a a a a a a … infinite times

d) Code will generate error

38 / 40

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

39 / 40

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

40 / 40

40. python file can also run on command line

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.