[miniorange_social_sharing]
[TheChamp-Login]

/40

Final Exam for Python for Everyone (A to Z)

BEST OF LUCK!!!

1 / 40

1.

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.

2 / 40

2. Variable names are case-sensitive

3 / 40

3. Snake Case
Each word is separated by an underscore character:

4 / 40

4.

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

5 / 40

5. Who developed Python Programming Language?

6 / 40

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

7 / 40

7.

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

8 / 40

8. Python has various versions available

9 / 40

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

10 / 40

10.

What is the data type of print(type(10))

11 / 40

11. Extension of all Python  Programme are .py

12 / 40

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

13 / 40

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

14 / 40

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

15 / 40

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

16 / 40

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

17 / 40

17. The length of an array is always one more than the highest array index.

18 / 40

18.

 Select the correct example of complex datatype in Python

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

19 / 40

19.

Which statement is correct?

A. List is immutable && Tuple is mutable
B. List is mutable && Tuple is immutable
C. Both are Mutable.
D. Both are Immutable

20 / 40

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

21 / 40

21.

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

a. 2

b. 3

c. 5

d. Multiple times

22 / 40

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

23 / 40

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

24 / 40

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

25 / 40

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

26 / 40

26. Python can connect to database systems.

27 / 40

27.

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.

28 / 40

28.

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

29 / 40

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

30 / 40

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

31 / 40

31.

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

32 / 40

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

33 / 40

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

34 / 40

34. print() function is often used to output variables.

35 / 40

35.

def cal(n1) : What is n1?

a. Parameter

b. Argument

c. Keyword

d. None of the above

36 / 40

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

37 / 40

37.

What is the value of the expression 100 / 25?

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

38 / 40

38. Comparison operators are not  used to compare two values

39 / 40

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

40 / 40

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

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.