[miniorange_social_sharing]
[TheChamp-Login]

/40

Final Exam for Python for Everyone (A to Z)

BEST OF LUCK!!!

1 / 40

1. Variable names are case-sensitive

2 / 40

2.

 Select the correct example of complex datatype in Python

  1. 3 + 2j
  2. -100j
  3. 5j
  4. All of the above are correct

3 / 40

3. You can also have an else without the elif

4 / 40

4.

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

5 / 40

5. Identity operators are used to compare the objects, not if they are equal, but if they are actually the same object, with the same memory location

6 / 40

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

7 / 40

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

8 / 40

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

9 / 40

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

10 / 40

10.

Following is an example of ___________________

sv = “csiplearninghub.com”

a. List

b. String

c. Dictionary

d. None of the above

11 / 40

11. Is there any comments in  following codes

i = 1while True:    if i%3 == 0:        break    print(i)     i + = 1

 

12 / 40

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

13 / 40

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

14 / 40

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

15 / 40

15.

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.

16 / 40

16. Python can be install on both  Linux and  Windows

17 / 40

17. What is another word for ‘iteration’ ?

a) Selection

b) Assignment

c) Sequencing

d) Repetition

18 / 40

18.

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

19 / 40

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

20 / 40

20. Suppose t = (1, 2, 4, 3), which of the following is incorrect?
a) print(t[3])
b) t[3] = 45
c) print(max(t))
d) print(len(t))

21 / 40

21. An example of an illegal character is a double quote inside a string that is surrounded by double quotes

22 / 40

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

23 / 40

23. A for loop is used for iterating over a sequence (that is either a list, a tuple, a dictionary, a set, or a string).

24 / 40

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

25 / 40

25.

def cal(n1) : What is n1?

a. Parameter

b. Argument

c. Keyword

d. None of the above

26 / 40

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

27 / 40

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

28 / 40

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

29 / 40

29.

What is the value of the expression 100 / 25?

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

30 / 40

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

31 / 40

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

32 / 40

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

33 / 40

33. Who developed Python Programming Language?

34 / 40

34. Python is an interpreted programming language

35 / 40

35.

Write the output of the following code :

str = "Welcome"str[2] = 'a'print(str)

a. Weacome

b. Error

c. aWelcome

d. Welcomea

36 / 40

36. Python has syntax that allows developers to write programs with fewer lines than some other programming languages.

37 / 40

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

38 / 40

38. Indentation refers to the spaces at the beginning of a code line.

39 / 40

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

40 / 40

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

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.