[miniorange_social_sharing]
[TheChamp-Login]

/40

Final Exam for Python for Everyone (A to Z)

BEST OF LUCK!!!

1 / 40

1.

 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.

2 / 40

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

3 / 40

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

4 / 40

4. A loop block in python starts with a –

a) ; (semicolon)

b) , (comma)

c) : (colon)

d) # (hash)

5 / 40

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

6 / 40

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

7 / 40

7. What is another word for ‘iteration’ ?

a) Selection

b) Assignment

c) Sequencing

d) Repetition

8 / 40

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

9 / 40

9. Which of the following is the use of function in python?
a) Functions are reusable pieces of programs
b) Functions don’t provide better modularity for your application
c) you can’t also create your own functions
d) All of the mentioned

10 / 40

10. Comparison operators are not  used to compare two values

11 / 40

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

12 / 40

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

13 / 40

13.

 What is output of: 35 == 35.0

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

14 / 40

14.

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

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

15 / 40

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

16 / 40

16.

def cal(n1) : What is n1?

a. Parameter

b. Argument

c. Keyword

d. None of the above

17 / 40

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

18 / 40

18. if statements cannot be empty, but if you for some reason have an if statement with no content, put in the pass statement to avoid getting an error

19 / 40

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

20 / 40

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

21 / 40

21.

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

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

22 / 40

22. Most recent major version of Python is Python 3

23 / 40

23. Variables that are created outside of a function

24 / 40

24.

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.

25 / 40

25. Extension of all Python  Programme are .py

26 / 40

26.

What will be the output of below Python code?

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

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

27 / 40

27.

Which is the correct operator for power(xy)?

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

28 / 40

28. Python is an interpreted programming language

29 / 40

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

30 / 40

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

31 / 40

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

32 / 40

32. X wants to allow the program to repeatedly ask the user to enter their Choice if it does not equal the Answer. Which loop option should X use?

a) while Choice == Answer:

Choice = input()

b) while Choice != Answer:

Choice = input()

c) while Answer != Choice:

Choice = input()

d) while Answer =! Choice:

Choice = input()

 

33 / 40

33. You can use three double quotes only:

a = “””Lorem ipsum dolor sit amet,
consectetur adipiscing elit,
sed do eiusmod tempor incididunt
ut labore et dolore magna aliqua.”””
print(a)

34 / 40

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

35 / 40

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

36 / 40

36.

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

37 / 40

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

38 / 40

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

39 / 40

39.

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

40 / 40

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

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.