[miniorange_social_sharing]
[TheChamp-Login]

/40

Final Exam for Python for Everyone (A to Z)

BEST OF LUCK!!!

1 / 40

1. Most recent major version of Python is Python 3

2 / 40

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

3 / 40

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

4 / 40

4.

 What is output of: 35 == 35.0

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

5 / 40

5. Is Python code compiled or interpreted?
a) Python code is both compiled and interpreted
b) Python code is neither compiled nor interpreted
c) Python code is only compiled
d) Python code is only interpreted

6 / 40

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

7 / 40

7.

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

8 / 40

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

9 / 40

9. Variables that are created outside of a function

10 / 40

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

11 / 40

11. Which term describes a loop that continues repeating without a terminating (ending) condition?

a) Infinite Loop

b) Conditional Loop

c) Unlimited Loop

d) Sequence Loop

12 / 40

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

13 / 40

13.

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

14 / 40

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

15 / 40

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

16 / 40

16.

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

17 / 40

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

18 / 40

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

19 / 40

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

20 / 40

20.

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

21 / 40

21.

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

22 / 40

22.

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

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

23 / 40

23. python file can also run on command line

24 / 40

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

25 / 40

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

26 / 40

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

27 / 40

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

28 / 40

28.

Which function overloads the >> operator?

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

29 / 40

29.

Following is an example of ___________________

sv = “csiplearninghub.com”

a. List

b. String

c. Dictionary

d. None of the above

30 / 40

30. Comparison operators are not  used to compare two values

31 / 40

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

32 / 40

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

33 / 40

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

34 / 40

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

35 / 40

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

36 / 40

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

37 / 40

37.

What will be the output of below Python code?

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

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

38 / 40

38.

What will be the output of below Python code?

tupl=([2,3],"abc",0,9)tupl[0][1]=1print(tupl)A. ([2,3],"abc",0,9)B. ([1,3],"abc",0,9)C. ([2,1],"abc",0,9)D. Error

39 / 40

39. A variable name cannot start with a number

40 / 40

40.

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.

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.