[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. Most recent major version of Python is Python 3

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. You can return a range of characters by using the slice syntax

5 / 40

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

6 / 40

6.

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

7 / 40

7.

Which is the correct operator for power(xy)?

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

8 / 40

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

9 / 40

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

10 / 40

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

11 / 40

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

12 / 40

12.

Which of the following statement is a function call?

a. call sum( )

b. def sum( )

c. sum( )

d. function sum( )

13 / 40

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

14 / 40

14.

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

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

15 / 40

15.

 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.

16 / 40

16.

 Select the correct example of complex datatype in Python

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

17 / 40

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

18 / 40

18.

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

a. True

b. False

19 / 40

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

20 / 40

20. Python can be install on both  Linux and  Windows

21 / 40

21.

Write the output of the following code :

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

a. Weacome

b. Error

c. aWelcome

d. Welcomea

22 / 40

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

23 / 40

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

24 / 40

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

25 / 40

25.

 What is output of: 35 == 35.0

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

26 / 40

26.

What is the value of the expression 100 / 25?

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

27 / 40

27. python file can also run on command line

28 / 40

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

29 / 40

29. Operators are used to perform operations on variables and values

30 / 40

30. What is the index value of ‘i’ in string “Learning”

a. 5

b. 3

c. 6

d. 7

31 / 40

31.

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

a. 2

b. 3

c. 5

d. Multiple times

32 / 40

32.

Following is an example of ___________________

sv = “csiplearninghub.com”

a. List

b. String

c. Dictionary

d. None of the above

33 / 40

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

34 / 40

34. 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()

 

35 / 40

35. Pascal Case
Each word starts with a capital letter:

36 / 40

36. Variables that are created outside of a function

37 / 40

37.

def cal(n1) : What is n1?

a. Parameter

b. Argument

c. Keyword

d. None of the above

38 / 40

38. Comments can be used to make the code more readable.

39 / 40

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

40 / 40

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

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.