[miniorange_social_sharing]
[TheChamp-Login]

/40

Final Exam for Python for Everyone (A to Z)

BEST OF LUCK!!!

1 / 40

1.

What is the value of the expression 100 / 25?

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

2 / 40

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

3 / 40

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

4 / 40

4. break in Python is used ______________

a) To restart a loop

b) Terminate a loop

c) To jump in between the loop

d) None of the above

5 / 40

5. You can have if statements inside if statements, this is called nested if statements.

6 / 40

6. Official site of python is www.python.org

7 / 40

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

8 / 40

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

9 / 40

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

10 / 40

10.

Python considered the character enclosed in triple quotes as String.(T/F)

a. True

b. False

11 / 40

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

12 / 40

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

13 / 40

13.

 ____________________ 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

14 / 40

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

15 / 40

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

16 / 40

16.

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.

17 / 40

17.

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

18 / 40

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

a. 5

b. 3

c. 6

d. 7

19 / 40

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

20 / 40

20.

Which function overloads the >> operator?

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

21 / 40

21. Python can be install on both  Linux and  Windows

22 / 40

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

23 / 40

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

24 / 40

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

25 / 40

25. You can return a range of characters by using the slice syntax

26 / 40

26.

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

27 / 40

27.

What will be the output of above Python code?

str1="6/4"print("str1")

A. 1
B. 6/4
C. 1.5
D. str1

28 / 40

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

29 / 40

29. Is there any comments in  following codes

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

 

30 / 40

30. python has two primitive loop commands:

  • while loops
  • for loops

31 / 40

31. Python relies on indentation?

32 / 40

32.

Which of the following statement is a function call?

a. call sum( )

b. def sum( )

c. sum( )

d. function sum( )

33 / 40

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

34 / 40

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

35 / 40

35. The format() method takes the passed arguments

36 / 40

36. Python has various versions available

37 / 40

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

38 / 40

38. Python is a  high-level programming language.

39 / 40

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

40 / 40

40.

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

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.