[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 a function call?

a. call sum( )

b. def sum( )

c. sum( )

d. function sum( )

2 / 40

2.

Function defined to achieve some task as per the programmer’s requirement is called a ___________

a. user defined function

b. library function

c. built in functions

d. All of the above.

3 / 40

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

4 / 40

4. print() function is often used to output variables.

5 / 40

5. Extension of all Python  Programme are .py

6 / 40

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

7 / 40

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

8 / 40

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

9 / 40

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

10 / 40

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

11 / 40

11.

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

12 / 40

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

13 / 40

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

14 / 40

14. Variable names are case-sensitive

15 / 40

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

16 / 40

16.

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

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

17 / 40

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

18 / 40

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

19 / 40

19.

Which keyword is used to begin the definition of a function?

a. Define

b. DEF

c. def

d. Def

20 / 40

20. Python is an interpreted programming language

21 / 40

21. Python can be install on both  Linux and  Windows

22 / 40

22. The length of an array is always one more than the highest array index.

23 / 40

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

24 / 40

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

25 / 40

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

26 / 40

26.

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

27 / 40

27. python file can also run on command line

28 / 40

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

29 / 40

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

30 / 40

30. The for loop in Python is an _____________

a) Entry Controlled Loop

b) Exit Controlled Loop

c) Both of the above

d) None of the above

31 / 40

31.

What is the value of the expression 100 / 25?

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

32 / 40

32.

What will be the output of above Python code?

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

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

33 / 40

33.

Which of the following creates a tuple?

A. tuple1=(“a”,”b”)
B. tuple1[2]=(“a”,”b”)
C. tuple1=(5)*2
D. None of the above

34 / 40

34.

Which is the correct operator for power(xy)?

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

35 / 40

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

36 / 40

36.

Following is an example of ___________________

sv = “csiplearninghub.com”

a. List

b. String

c. Dictionary

d. None of the above

37 / 40

37. Which of the following character is used to give single-line comments in Python?
a) //
b) #
c) !
d) /*

38 / 40

38.

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

39 / 40

39. Most recent major version of Python is Python 3

40 / 40

40. python has two primitive loop commands:

  • while loops
  • for loops

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.