[miniorange_social_sharing]
[TheChamp-Login]

/40

Final Exam for Python for Everyone (A to Z)

BEST OF LUCK!!!

1 / 40

1. Variable names are case-sensitive

2 / 40

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

3 / 40

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

4 / 40

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

5 / 40

5.

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.

6 / 40

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

7 / 40

7. Most recent major version of Python is Python 3

8 / 40

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

9 / 40

9. Who developed Python Programming Language?

10 / 40

10.

How to copy one list to another in python?

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

11 / 40

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

12 / 40

12.

Which of the following statement will execute in last?

def s(n1): #Statement 1      print(n1) #Statement 2n2=4 #Statement 3s(n2) #Statement 4

a. Statement 1

b. Statement 2

c. Statement 3

d. Statement 4

13 / 40

13.

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

14 / 40

14.

What is the value of the expression 100 / 25?

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

15 / 40

15. You can also have an else without the elif

16 / 40

16. Python can be install on both  Linux and  Windows

17 / 40

17.

Which of the following precedence order is correct in Python?

  1. Parentheses, Exponential, Multiplication, Division, Addition, Subtraction
  2. Multiplication, Division, Addition, Subtraction, Parentheses, Exponential
  3. Division, Multiplication, Addition, Subtraction, Parentheses, Exponential
  4. Exponential, Parentheses, Multiplication, Division, Addition, Subtraction

18 / 40

18.

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

19 / 40

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

20 / 40

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

21 / 40

21.

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

22 / 40

22.

 Select the correct example of complex datatype in Python

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

23 / 40

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

24 / 40

24. Which of the following is False regarding loops in Python?

a)Loops are used to perform certain tasks repeatedly.

b) while loop is used when multiple statements are to executed repeatedly until the given condition becomes true.

c) while loop is used when multiple statements are to executed repeatedly until the given condition becomes false.

d) for loop can be used to iterate through the elements of lists.

25 / 40

25.

Which of the following is not a keyword in Python language?

  1. val
  2. raise
  3. try
  4. with

26 / 40

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

a. 5

b. 3

c. 6

d. 7

27 / 40

27.

What will the below Python code will return?

If str1="save paper,save plants"str1.find("save")

A. It returns the first index position of the first occurance of “save” in the given string str1.
B. It returns the last index position of the last occurance of “save” in the given string str1.
C. It returns the last index position of the first occurance of “save” in the given string str1.
D. It returns the first index position of the first occurance of “save” in the given string str1.

28 / 40

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

29 / 40

29. Python can connect to database systems.

30 / 40

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

31 / 40

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

32 / 40

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

33 / 40

33. The list’s remove() method only removes the first occurrence of the specified value.

34 / 40

34. Python is a  high-level programming language.

35 / 40

35.

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

36 / 40

36. Python has various versions available

37 / 40

37. Comparison operators are not  used to compare two values

38 / 40

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

39 / 40

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

40 / 40

40. Suppose t = (1, 2, 4, 3), which of the following is incorrect?
a) print(t[3])
b) t[3] = 45
c) print(max(t))
d) print(len(t))

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.