[miniorange_social_sharing]
[TheChamp-Login]

/40

Final Exam for Python for Everyone (A to Z)

BEST OF LUCK!!!

1 / 40

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

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

a) Hi
b) Know Program

c)
Hi
Hello

d)
Know Program
Hello

2 / 40

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

3 / 40

3. Who developed Python Programming Language?

4 / 40

4. With the for loop we can execute a set of statements

5 / 40

5.

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

6 / 40

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

7 / 40

7. What is another word for ‘iteration’ ?

a) Selection

b) Assignment

c) Sequencing

d) Repetition

8 / 40

8.

def cal(n1) : What is n1?

a. Parameter

b. Argument

c. Keyword

d. None of the above

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. Find the output of the given Python program?

a = 25if a < 15:    print("Hi")if a <= 30:    print("Hello")else:    print("Know Program")

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

11 / 40

11. Python relies on indentation?

12 / 40

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

13 / 40

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

14 / 40

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

15 / 40

15. Which keyword is used for function?
a) Fun
b) Define
c) Def
d) Function

16 / 40

16. Pascal Case
Each word starts with a capital letter:

17 / 40

17.

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.

18 / 40

18. Comments can be used to explain Python code.

19 / 40

19. Comments starts with a #

20 / 40

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

21 / 40

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

22 / 40

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

23 / 40

23. Camel Case
Each word, except the first, starts with a capital letter:

24 / 40

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

25 / 40

25.

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

a. True

b. False

26 / 40

26. Python is a  high-level programming language.

27 / 40

27.

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

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

28 / 40

28.

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

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

29 / 40

29.

How to copy one list to another in python?

A. l1[] = l2[]
B. l1[] = l2
C. l1[] = l2[:]
D. l1 = l2

30 / 40

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

31 / 40

31.

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

32 / 40

32.

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

33 / 40

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

34 / 40

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

35 / 40

35.

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.

36 / 40

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

37 / 40

37. You can also have an else without the elif

38 / 40

38.

What is the value of the expression 100 / 25?

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

39 / 40

39. Extension of all Python  Programme are .py

40 / 40

40. What keyword would you use to add an alternative condition to an if statement?

a) else if
b) elseif
c) elif
d) None of the above

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.