[miniorange_social_sharing]
[TheChamp-Login]

/40

Final Exam for Python for Everyone (A to Z)

BEST OF LUCK!!!

1 / 40

1. The format() method takes the passed arguments

2 / 40

2. The elif keyword is pythons way of saying “if the previous conditions were not true, then try this condition”.

3 / 40

3. You can also have multiple else statements on the same line:

4 / 40

4.

Which of the following statement is a function call?

a. call sum( )

b. def sum( )

c. sum( )

d. function sum( )

5 / 40

5. Operators are used to perform operations on variables and values

6 / 40

6. You can also have an else without the elif

7 / 40

7.

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

8 / 40

8.

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

9 / 40

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

10 / 40

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

11 / 40

11.

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

12 / 40

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

13 / 40

13.

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

14 / 40

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

15 / 40

15.

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

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

16 / 40

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

17 / 40

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

18 / 40

18.  ________ in Python is a counter-controlled loop.

a) for

b) while

c) Both (a) and (b)

d) None of the above

19 / 40

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

20 / 40

20. When does the else statement written after loop executes?

a) When loop condition becomes false

b) When break statement is executed in the loop

c) else statement is always executed

d) None of the above

21 / 40

21. Who developed Python Programming Language?

22 / 40

22. python file can also run on command line

23 / 40

23. Extension of all Python  Programme are .py

24 / 40

24. Most recent major version of Python is Python 3

25 / 40

25. A variable name can only contain alpha-numeric characters and
underscores

26 / 40

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

27 / 40

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

28 / 40

28.

What will be the output of below Python code?

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

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

29 / 40

29.

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

30 / 40

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

31 / 40

31.

What will be the output of above Python code?

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

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

32 / 40

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

33 / 40

33. What is another word for ‘iteration’ ?

a) Selection

b) Assignment

c) Sequencing

d) Repetition

34 / 40

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

35 / 40

35.

How to copy one list to another in python?

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

36 / 40

36.

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

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

37 / 40

37. A variable name cannot start with a number

38 / 40

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

39 / 40

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

40 / 40

40. Comments can be used to explain Python code.

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.