[miniorange_social_sharing]
[TheChamp-Login]

/40

Final Exam for Python for Everyone (A to Z)

BEST OF LUCK!!!

1 / 40

1.

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

a. True

b. False

2 / 40

2.

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.

3 / 40

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

4 / 40

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

5 / 40

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

6 / 40

6. Who developed Python Programming Language?

7 / 40

7. Comments can be used to explain Python code.

8 / 40

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

9 / 40

9. Python has various versions available

10 / 40

10. python file can also run on command line

11 / 40

11. What is another word for ‘iteration’ ?

a) Selection

b) Assignment

c) Sequencing

d) Repetition

12 / 40

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

13 / 40

13. An example of an illegal character is a double quote inside a string that is surrounded by double quotes

14 / 40

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

15 / 40

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

16 / 40

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

17 / 40

17. A variable name cannot start with a number

18 / 40

18. python has two primitive loop commands:

  • while loops
  • for loops

19 / 40

19.

 ____________________ 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

20 / 40

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

21 / 40

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

22 / 40

22.

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

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

23 / 40

23. Is there any comments in  following codes

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

 

24 / 40

24.

What is the data type of print(type(0xFF))

25 / 40

25.

What is the value of the expression 100 / 25?

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

26 / 40

26.

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

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

27 / 40

27.

How to copy one list to another in python?

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

28 / 40

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

29 / 40

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

30 / 40

30. What is the index value of ‘i’ in string “Learning”

a. 5

b. 3

c. 6

d. 7

31 / 40

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

32 / 40

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

33 / 40

33.

 Select the correct example of complex datatype in Python

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

34 / 40

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

35 / 40

35. Python can be install on both  Linux and  Windows

36 / 40

36. Python has syntax that allows developers to write programs with fewer lines than some other programming languages.

37 / 40

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

38 / 40

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

39 / 40

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

40 / 40

40. Extension of all Python  Programme are .py

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.