[miniorange_social_sharing]
[TheChamp-Login]

/40

Final Exam for Python for Everyone (A to Z)

BEST OF LUCK!!!

1 / 40

1. Most recent major version of Python is Python 3

2 / 40

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

3 / 40

3. Extension of all Python  Programme are .py

4 / 40

4.

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

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

5 / 40

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

6 / 40

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

7 / 40

7. The for loop does not require an indexing variable to set beforehand

8 / 40

8.

l = [ 4, 8, 9, 2.6, 5 ] is a type of which data type in python?

  1. List
  2. Tuple
  3. Set
  4. None of these

9 / 40

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

10 / 40

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

11 / 40

11. Can we write if/else into one line in python?

a) Yes
b) No
c) if/else not used in python
d) None of the above

12 / 40

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

13 / 40

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

14 / 40

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

15 / 40

15. Which of the following is a Python tuple?
a) [1, 2, 3]
b) (1, 2, 3)
c) {1, 2, 3}
d) {}

16 / 40

16. A variable name cannot start with a number

17 / 40

17.

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

a. True

b. False

18 / 40

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

19 / 40

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

20 / 40

20. python has two primitive loop commands:

  • while loops
  • for loops

21 / 40

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

22 / 40

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

23 / 40

23.

Which of the following is False?

A. String is immutable.
B. capitalize() function in string is used to return a string by converting the whole given string into uppercase.
C. lower() function in string is used to return a string by converting the whole given string into lowercase.
D. None of these.

24 / 40

24. What keyword would you use to add an alternative condition to an if statement?

a) else if
b) elseif
c) elif
d) None of the above

25 / 40

25.

 Select the correct example of complex datatype in Python

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

26 / 40

26. Variables that are created outside of a function

27 / 40

27.

 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.

28 / 40

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

29 / 40

29. Comments can be used to explain Python code.

30 / 40

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

31 / 40

31. You can also have an else without the elif

32 / 40

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

33 / 40

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

34 / 40

34.

Following is an example of ___________________

sv = “csiplearninghub.com”

a. List

b. String

c. Dictionary

d. None of the above

35 / 40

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

36 / 40

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

  1. d = {"john":40, "peter":45}
  2. d["john"]

a) 40
b) 45
c) “john”
d) “peter”

37 / 40

37.

What is the value of the expression 100 / 25?

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

38 / 40

38. Python can connect to database systems.

39 / 40

39.

Which statement is correct?

A. List is immutable && Tuple is mutable
B. List is mutable && Tuple is immutable
C. Both are Mutable.
D. Both are Immutable

40 / 40

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

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.