[miniorange_social_sharing]
[TheChamp-Login]

/40

Final Exam for Python for Everyone (A to Z)

BEST OF LUCK!!!

1 / 40

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

2 / 40

2. Extension of all Python  Programme are .py

3 / 40

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

4 / 40

4.

 ____________________ 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

5 / 40

5.

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

6 / 40

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

7 / 40

7. We can combine strings and numbers by using the format() method

8 / 40

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

9 / 40

9.

Which is the correct operator for power(xy)?

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

10 / 40

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

11 / 40

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

12 / 40

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

13 / 40

13. Python  was created by Guido van Rossum, and released in 1999.

14 / 40

14.

Which keyword is used to begin the definition of a function?

a. Define

b. DEF

c. def

d. Def

15 / 40

15. Comments can be used to explain Python code.

16 / 40

16.

Which of the following precedence order is correct in Python?

  1. Parentheses, Exponential, Multiplication, Division, Addition, Subtraction
  2. Multiplication, Division, Addition, Subtraction, Parentheses, Exponential
  3. Division, Multiplication, Addition, Subtraction, Parentheses, Exponential
  4. Exponential, Parentheses, Multiplication, Division, Addition, Subtraction

17 / 40

17.

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

a. [ ]

b. { }

c. ( )

d. None of the above

18 / 40

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

19 / 40

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

20 / 40

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

21 / 40

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

22 / 40

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

23 / 40

23. Which of the following is a Python tuple?
a) [1, 2, 3]
b) (1, 2, 3)
c) {1, 2, 3}
d) {}

24 / 40

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

25 / 40

25.

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

26 / 40

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

27 / 40

27. What is another word for ‘iteration’ ?

a) Selection

b) Assignment

c) Sequencing

d) Repetition

28 / 40

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

29 / 40

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

30 / 40

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

31 / 40

31.

In a program, a function can be called ____________ times.

a. 2

b. 3

c. 5

d. Multiple times

32 / 40

32.

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

33 / 40

33.

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

34 / 40

34. Who developed Python Programming Language?

35 / 40

35.

What is the data type of print(type(10))

36 / 40

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

37 / 40

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

38 / 40

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

39 / 40

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

40 / 40

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

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.