[miniorange_social_sharing]
[TheChamp-Login]

/40

Final Exam for Python for Everyone (A to Z)

BEST OF LUCK!!!

1 / 40

1. The else keyword catches anything which isn’t caught by the preceding conditions.

2 / 40

2. Python has a set of built-in methods that you can use on lists/arrays

3 / 40

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

4 / 40

4. Python is a  high-level programming language.

5 / 40

5. Find the output of the given Python program?

a = 25if a < 15:    print("Hi")if a <= 30:    print("Hello")else:    print("Know Program")

a) Hi
b) Hello
c) Know Program
d) Compiled Successfully, No Output.

6 / 40

6.

Which of the following statements assigns the value 25 to the variable x in Python:

  1. x ← 25
  2. x = 25
  3. x := 25
  4. int x = 25
  5. x << 25

7 / 40

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

8 / 40

8.

 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.

9 / 40

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

10 / 40

10. The list’s remove() method only removes the first occurrence of the specified value.

11 / 40

11.

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

a. True

b. False

12 / 40

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

13 / 40

13. Variable names are case-sensitive

14 / 40

14.

Write the output of the following code :

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

a. Weacome

b. Error

c. aWelcome

d. Welcomea

15 / 40

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

16 / 40

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

17 / 40

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

18 / 40

18.

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

19 / 40

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

20 / 40

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

21 / 40

21.

Which function overloads the >> operator?

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

22 / 40

22.

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

23 / 40

23. Comments can be used to explain Python code.

24 / 40

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

25 / 40

25.

What will be the output of below Python code?

tupl=([2,3],"abc",0,9)tupl[0][1]=1print(tupl)A. ([2,3],"abc",0,9)B. ([1,3],"abc",0,9)C. ([2,1],"abc",0,9)D. Error

26 / 40

26. Python can connect to database systems.

27 / 40

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

28 / 40

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

29 / 40

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

30 / 40

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

31 / 40

31.

 What is output of: 35 == 35.0

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

32 / 40

32. You can also have an else without the elif

33 / 40

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

34 / 40

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

35 / 40

35. Python is an interpreted programming language

36 / 40

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

a. 5

b. 3

c. 6

d. 7

37 / 40

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

38 / 40

38.

What is the value of the expression 100 / 25?

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

39 / 40

39. Python  was created by Guido van Rossum, and released in 1999.

40 / 40

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

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.