[miniorange_social_sharing]
[TheChamp-Login]

/40

Final Exam for Python for Everyone (A to Z)

BEST OF LUCK!!!

1 / 40

1.

 What is output of: 35 == 35.0

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

2 / 40

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

3 / 40

3. Python has various versions available

4 / 40

4.

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

5 / 40

5.

What will be the output of below Python code?

str1="poWer"str1.upper()print(str1)

A. POWER
B. Power
C. power
D. poWer

6 / 40

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

7 / 40

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

8 / 40

8. You have to use the same number of spaces in the same block of code, otherwise Python will give you an error

9 / 40

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

  1. d = {"john":40, "peter":45}
  2. d["john"]

a) 40
b) 45
c) “john”
d) “peter”

10 / 40

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

11 / 40

11.

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

12 / 40

12. python file can also run on command line

13 / 40

13.

The most important object defined in NumPy is an N-dimensional array type called?

A. ndarray
B. narray
C. nd_array
D. darray

14 / 40

14. Python has a set of built-in methods that you can use on lists/arrays

15 / 40

15.

Which is the correct operator for power(xy)?

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

16 / 40

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

17 / 40

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

18 / 40

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

19 / 40

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

20 / 40

20.

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

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

21 / 40

21.

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

22 / 40

22. Indentation refers to the spaces at the beginning of a code line.

23 / 40

23.

What will be the output of above Python code?

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

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

24 / 40

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

25 / 40

25. Is there any comments in  following codes

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

 

26 / 40

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

27 / 40

27.

Function defined to achieve some task as per the programmer’s requirement is called a ___________

a. user defined function

b. library function

c. built in functions

d. All of the above.

28 / 40

28.

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

a. Define

b. DEF

c. def

d. Def

29 / 40

29.

What do we use to define a block of code in Python language?

  1. Key
  2. Brackets
  3. Indentation
  4. None of these

30 / 40

30.

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

a. True

b. False

31 / 40

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

32 / 40

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

33 / 40

33. Python is an interpreted programming language

34 / 40

34.

Choose the correct option with respect to Python.

A. Both tuples and lists are immutable.
B. Tuples are immutable while lists are mutable.
C. Both tuples and lists are mutable.
D. Tuples are mutable while lists are immutable.

35 / 40

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

36 / 40

36. Python is a  high-level programming language.

37 / 40

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

38 / 40

38. Variables that are created outside of a function

39 / 40

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

40 / 40

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

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.