[miniorange_social_sharing]
[TheChamp-Login]

/40

Final Exam for Python for Everyone (A to Z)

BEST OF LUCK!!!

1 / 40

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

2 / 40

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

3 / 40

3.

Which is the correct operator for power(xy)?

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

4 / 40

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

5 / 40

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

6 / 40

6. Variables that are created outside of a function

7 / 40

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

8 / 40

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

9 / 40

9.

def cal(n1) : What is n1?

a. Parameter

b. Argument

c. Keyword

d. None of the above

10 / 40

10. Comments can be used to explain Python code.

11 / 40

11. Which of the following is the correct extension of the Python file?

12 / 40

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

13 / 40

13.

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

a. True

b. False

14 / 40

14. What is the output of the given below program?

if 1 + 3 == 7:    print("Hello")else:    print("Know Program")

a) Hello
b) Know Program
c) Compiled Successfully, No Output.
d) Error

15 / 40

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

16 / 40

16.

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

17 / 40

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

18 / 40

18.

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.

19 / 40

19. Python can connect to database systems.

20 / 40

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

21 / 40

21.

Which function overloads the >> operator?

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

22 / 40

22. Which of the following character is used to give single-line comments in Python?
a) //
b) #
c) !
d) /*

23 / 40

23. Comments starts with a #

24 / 40

24. A variable name must start with a letter or the underscore character

25 / 40

25.

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.

26 / 40

26. What is another word for ‘iteration’ ?

a) Selection

b) Assignment

c) Sequencing

d) Repetition

27 / 40

27. python file can also run on command line

28 / 40

28.

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

29 / 40

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

30 / 40

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

31 / 40

31.

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

32 / 40

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

33 / 40

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

34 / 40

34. Can we write if/else into one line in python?

a) Yes
b) No
c) if/else not used in python
d) None of the above

35 / 40

35. Most recent major version of Python is Python 3

36 / 40

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

37 / 40

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

38 / 40

38.

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

39 / 40

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

40 / 40

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

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.