[miniorange_social_sharing]
[TheChamp-Login]

/40

Final Exam for Python for Everyone (A to Z)

BEST OF LUCK!!!

1 / 40

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

2 / 40

2.

Which function overloads the >> operator?

  1. more()
  2. gt()
  3. ge()
  4. None of the above

3 / 40

3. Is there any comments in  following codes

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

 

4 / 40

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

5 / 40

5.

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

6 / 40

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

7 / 40

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

8 / 40

8. Python can be install on both  Linux and  Windows

9 / 40

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

10 / 40

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

11 / 40

11. A variable name cannot start with a number

12 / 40

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

13 / 40

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

14 / 40

14. Arrays are used to store multiple values in one single variable.

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 has a set of built-in methods that you can use on lists/arrays

17 / 40

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

18 / 40

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

19 / 40

19. What keyword would you use to add an alternative condition to an if statement?

a) else if
b) elseif
c) elif
d) None of the above

20 / 40

20. A for loop is used for iterating over a sequence (that is either a list, a tuple, a dictionary, a set, or a string).

21 / 40

21.

What is the value of the expression 100 / 25?

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

22 / 40

22.

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

23 / 40

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

24 / 40

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

25 / 40

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

26 / 40

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

27 / 40

27. 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))

28 / 40

28. Comments starts with a #

29 / 40

29.

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

a. 2

b. 3

c. 5

d. Multiple times

30 / 40

30. python file can also run on command line

31 / 40

31. The else keyword catches anything which isn’t caught by the preceding conditions.

32 / 40

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

33 / 40

33.

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.

34 / 40

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

35 / 40

35. Which of the following is the correct extension of the Python file?

36 / 40

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

a. 5

b. 3

c. 6

d. 7

37 / 40

37. Strings in python are surrounded by either single quotation marks, or double quotation marks

38 / 40

38.

 What is output of: 35 == 35.0

  1. False
  2. True
  3. 33
  4. None of the above

39 / 40

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

40 / 40

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

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.