[miniorange_social_sharing]
[TheChamp-Login]

/40

Final Exam for Python for Everyone (A to Z)

BEST OF LUCK!!!

1 / 40

1. You can also have an else without the elif

2 / 40

2.

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

a. [ ]

b. { }

c. ( )

d. None of the above

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

5 / 40

5.

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

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

6 / 40

6.

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

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

7 / 40

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

8 / 40

8. Python is a  high-level programming language.

9 / 40

9.

Which of the following statement is a function call?

a. call sum( )

b. def sum( )

c. sum( )

d. function sum( )

10 / 40

10.

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

a. True

b. False

11 / 40

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

12 / 40

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

13 / 40

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

14 / 40

14. Which of the following is False regarding loops in Python?

a)Loops are used to perform certain tasks repeatedly.

b) while loop is used when multiple statements are to executed repeatedly until the given condition becomes true.

c) while loop is used when multiple statements are to executed repeatedly until the given condition becomes false.

d) for loop can be used to iterate through the elements of lists.

15 / 40

15. Comparison operators are not  used to compare two values

16 / 40

16.

Which of the following statement will execute in last?

def s(n1): #Statement 1      print(n1) #Statement 2n2=4 #Statement 3s(n2) #Statement 4

a. Statement 1

b. Statement 2

c. Statement 3

d. Statement 4

17 / 40

17. Snake Case
Each word is separated by an underscore character:

18 / 40

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

19 / 40

19. Python is an interpreted programming language

20 / 40

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

21 / 40

21. Most recent major version of Python is Python 3

22 / 40

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

23 / 40

23.

 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.

24 / 40

24.

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

25 / 40

25.

What will be the output of below Python code?

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

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

26 / 40

26.

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

27 / 40

27. python file can also run on command line

28 / 40

28. Find the output of the given Python program?

a, b, c = 1, 3, 5if a > 0:  if b < 2:    print("Hi")  elif c > 3:    print("Hello")else:  print("Know Program")

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

29 / 40

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

30 / 40

30. With the break statement we can stop the loop before it has looped through all the items

31 / 40

31. A loop block in python starts with a –

a) ; (semicolon)

b) , (comma)

c) : (colon)

d) # (hash)

32 / 40

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

33 / 40

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

34 / 40

34. A variable name cannot start with a number

35 / 40

35. Who developed Python Programming Language?

36 / 40

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

37 / 40

37.

Which one of the following is the correct extension of the Python file?

  1. .py
  2. .python
  3. .p
  4. None of these

38 / 40

38.

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

39 / 40

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

40 / 40

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

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.