[miniorange_social_sharing]
[TheChamp-Login]

/40

Final Exam for Python for Everyone (A to Z)

BEST OF LUCK!!!

1 / 40

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

2 / 40

2.

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

3 / 40

3.

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

4 / 40

4. You can use three double quotes only:

a = “””Lorem ipsum dolor sit amet,
consectetur adipiscing elit,
sed do eiusmod tempor incididunt
ut labore et dolore magna aliqua.”””
print(a)

5 / 40

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

6 / 40

6. Most recent major version of Python is Python 3

7 / 40

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

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. Python  was created by Guido van Rossum, and released in 1999.

11 / 40

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

12 / 40

12.

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

13 / 40

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

14 / 40

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

15 / 40

15. A variable name can only contain alpha-numeric characters and
underscores

16 / 40

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

17 / 40

17. Variable names are case-sensitive

18 / 40

18. A variable name cannot start with a number

19 / 40

19.

Following is an example of ___________________

sv = “csiplearninghub.com”

a. List

b. String

c. Dictionary

d. None of the above

20 / 40

20. Comments starts with a #

21 / 40

21.

What is the value of the expression 100 / 25?

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

22 / 40

22. Python has various versions available

23 / 40

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

24 / 40

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

25 / 40

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

26 / 40

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

27 / 40

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

28 / 40

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

29 / 40

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

30 / 40

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

31 / 40

31. Comments can be used to explain Python code.

32 / 40

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

33 / 40

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

34 / 40

34. You can also have an else without the elif

35 / 40

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

36 / 40

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

37 / 40

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

38 / 40

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

39 / 40

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

40 / 40

40. Python can be install on both  Linux and  Windows

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.