[miniorange_social_sharing]
[TheChamp-Login]

/40

Final Exam for Python for Everyone (A to Z)

BEST OF LUCK!!!

1 / 40

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

2 / 40

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

3 / 40

3. Which term describes a loop that continues repeating without a terminating (ending) condition?

a) Infinite Loop

b) Conditional Loop

c) Unlimited Loop

d) Sequence Loop

4 / 40

4.

Which function overloads the >> operator?

  1. more()
  2. gt()
  3. ge()
  4. None of the above

5 / 40

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

a) for

b) while

c) Both (a) and (b)

d) None of the above

6 / 40

6.

Following is an example of ___________________

sv = “csiplearninghub.com”

a. List

b. String

c. Dictionary

d. None of the above

7 / 40

7. Python is a  high-level programming language.

8 / 40

8.

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

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

9 / 40

9. Who developed Python Programming Language?

10 / 40

10.

What is the value of the expression 100 / 25?

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

11 / 40

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

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. A variable name cannot start with a number

14 / 40

14. Variable names are case-sensitive

15 / 40

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

16 / 40

16. Python is an interpreted programming language

17 / 40

17.

In a program, a function can be called ____________ times.

a. 2

b. 3

c. 5

d. Multiple times

18 / 40

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

19 / 40

19.

 ____________________ can be defined as a named group of instructions that accomplish a specific task when it is invoked/called.

a. Function

b. Datatype

c. Token

d. Operator

20 / 40

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

21 / 40

21. Is Python code compiled or interpreted?
a) Python code is both compiled and interpreted
b) Python code is neither compiled nor interpreted
c) Python code is only compiled
d) Python code is only interpreted

22 / 40

22.

What will be the output of below Python code?

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

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

23 / 40

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

24 / 40

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

25 / 40

25.

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.

26 / 40

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

27 / 40

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

28 / 40

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

29 / 40

29.

In Python, a variable may be assigned a value of one type, and then later assigned a value of a different type:

  1. False
  2. True

30 / 40

30. All keywords in Python are in _________
a) Capitalized
b) lower case
c) UPPER CASE
d) None of the mentioned

31 / 40

31.

Which of the following statement is a function call?

a. call sum( )

b. def sum( )

c. sum( )

d. function sum( )

32 / 40

32. Variables that are created outside of a function

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. What is another word for ‘iteration’ ?

a) Selection

b) Assignment

c) Sequencing

d) Repetition

35 / 40

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

36 / 40

36. What does the following code print?

x = -10if x < 0:    print("The negative number ",  x, " is not valid here.")print("This is always printed")
a.This is always printedb.The negative number -10 is not valid hereThis is always printedc.The negative number -10 is not valid here

37 / 40

37. Python can connect to database systems.

38 / 40

38.

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

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

39 / 40

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

40 / 40

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

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.