[miniorange_social_sharing]
[TheChamp-Login]

/40

Final Exam for Python for Everyone (A to Z)

BEST OF LUCK!!!

1 / 40

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

2 / 40

2. You can use the pop() method to remove an element from the array

3 / 40

3. A loop block in python starts with a –

a) ; (semicolon)

b) , (comma)

c) : (colon)

d) # (hash)

4 / 40

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

5 / 40

5. Find and write the output of the following python code:

x = “abcdef”

i = “a”

while i in x:

print(i, end = ” “)

a) a

b) a a a a a a

c) a a a a a a … infinite times

d) Code will generate error

6 / 40

6. Python can be used on a server to create web applications?

7 / 40

7. Find the output of the following program segments:

for i in range(20,30,2):

print(i)

a) 20 22 24 26 28

b) 20

22

24

26

28

c) 20 22 24 26 28 30

d) 20

22

24

26

28

30

8 / 40

8. Which of the following loop is not supported by the python programming language?

a) for loop

b) while loop

c) do…while loop

d) None of the above

9 / 40

9. What will be the output of the following Python code?

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

a) 1 2
b) 1 2 3
c) error
d) none of the mentioned

10 / 40

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

11 / 40

11. The format() method takes the passed arguments

12 / 40

12. Who developed Python Programming Language?

13 / 40

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

14 / 40

14.

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

15 / 40

15.

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

a. True

b. False

16 / 40

16. You can have if statements inside if statements, this is called nested if statements.

17 / 40

17. Comparison operators are not  used to compare two values

18 / 40

18. Most recent major version of Python is Python 3

19 / 40

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

20 / 40

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

21 / 40

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

22 / 40

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

23 / 40

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

24 / 40

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

25 / 40

25. Python can connect to database systems.

26 / 40

26. An array is a special variable, which can hold more than one value at a time

27 / 40

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

28 / 40

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

29 / 40

29.

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

30 / 40

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

31 / 40

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

32 / 40

32.

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

33 / 40

33.

Following is an example of ___________________

sv = “csiplearninghub.com”

a. List

b. String

c. Dictionary

d. None of the above

34 / 40

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

35 / 40

35.

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

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

36 / 40

36. A variable name cannot start with a number

37 / 40

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

38 / 40

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

39 / 40

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

40 / 40

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

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.