[miniorange_social_sharing]
[TheChamp-Login]

/40

Final Exam for Python for Everyone (A to Z)

BEST OF LUCK!!!

1 / 40

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

2 / 40

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

3 / 40

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

4 / 40

4. Python can be used on a server to create web applications?

5 / 40

5. Arithmetic operators are used with numeric values to perform common mathematical operations

6 / 40

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

7 / 40

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

8 / 40

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

9 / 40

9. Python is an interpreted programming language

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

12 / 40

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

13 / 40

13.

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

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

14 / 40

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

15 / 40

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

16 / 40

16.

 Select the correct example of complex datatype in Python

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

17 / 40

17. You can also have an else without the elif

18 / 40

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

19 / 40

19.

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.

20 / 40

20. Which of the following loop is not supported by the python programming language?

a) for loop

b) while loop

c) do…while loop

d) None of the above

21 / 40

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

22 / 40

22.

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

23 / 40

23.

 ____________________ 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

24 / 40

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

25 / 40

25.

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

26 / 40

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

27 / 40

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

28 / 40

28.

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

29 / 40

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

30 / 40

30. To write and execute code in python, we first need to install Python on our system

31 / 40

31.

Which is the correct operator for power(xy)?

  1. X^y
  2. X**y
  3. X^^y
  4. None of the mentioned

32 / 40

32. You can use the append() method to add an element to an array

33 / 40

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

34 / 40

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

35 / 40

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

36 / 40

36. A variable name must start with a letter or the underscore character

37 / 40

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

38 / 40

38. With the break statement we can stop the loop even if the while condition is true

39 / 40

39.

Following is an example of ___________________

sv = “csiplearninghub.com”

a. List

b. String

c. Dictionary

d. None of the above

40 / 40

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

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.