[miniorange_social_sharing]
[TheChamp-Login]

/40

Final Exam for Python for Everyone (A to Z)

BEST OF LUCK!!!

1 / 40

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

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. Arithmetic operators are used with numeric values to perform common mathematical operations

4 / 40

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

5 / 40

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

6 / 40

6. Extension of all Python  Programme are .py

7 / 40

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

8 / 40

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

9 / 40

9.

 What is output of: 35 == 35.0

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

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. Pascal Case
Each word starts with a capital letter:

12 / 40

12. Python is a  high-level programming language.

13 / 40

13. A loop block in python starts with a –

a) ; (semicolon)

b) , (comma)

c) : (colon)

d) # (hash)

14 / 40

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

15 / 40

15. X wants to allow the program to repeatedly ask the user to enter their Choice if it does not equal the Answer. Which loop option should X use?

a) while Choice == Answer:

Choice = input()

b) while Choice != Answer:

Choice = input()

c) while Answer != Choice:

Choice = input()

d) while Answer =! Choice:

Choice = input()

 

16 / 40

16. Comparison operators are not  used to compare two values

17 / 40

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

18 / 40

18. Variable names are case-sensitive

19 / 40

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

20 / 40

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

21 / 40

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

22 / 40

22.

What will be the output of below Python code?

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

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

23 / 40

23.

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

24 / 40

24. Python will give you an error if you skip the indentation

25 / 40

25. What will be the output of the following Python code?

x = ['ab', 'cd']for i in x:    i.upper()print(x)

a) [‘ab’, ‘cd’]
b) [‘AB’, ‘CD’]
c) [None, None]
d) none of the mentioned

26 / 40

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

27 / 40

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

28 / 40

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

29 / 40

29.

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.

30 / 40

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

31 / 40

31. Variables that are created outside of a function

32 / 40

32.

 Which of the following statement is False?

  1. Variable names can be arbitrarily long.
  2. They can contain both letters and numbers.
  3. Variable name can begin with underscore.
  4. Variable name can begin with number.

33 / 40

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

34 / 40

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

35 / 40

35.

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

36 / 40

36.

The function can be called in the program by writing function name followed by ____

a. [ ]

b. { }

c. ( )

d. None of the above

37 / 40

37.

What is the value of the expression 100 / 25?

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

38 / 40

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

39 / 40

39. Python can connect to database systems.

40 / 40

40. A variable name cannot start with a number

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.