[miniorange_social_sharing]
[TheChamp-Login]

/40

Final Exam for Python for Everyone (A to Z)

BEST OF LUCK!!!

1 / 40

1.

What is the value of the expression 100 / 25?

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

2 / 40

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

3 / 40

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

4 / 40

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

5 / 40

5. Which of the following loop is not supported by the python programming language?

a) for loop

b) while loop

c) do…while loop

d) None of the above

6 / 40

6.

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

a. Define

b. DEF

c. def

d. Def

7 / 40

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

8 / 40

8.

The function can be called in the program by writing function name followed by ____

a. [ ]

b. { }

c. ( )

d. None of the above

9 / 40

9.

Following is an example of ___________________

sv = “csiplearninghub.com”

a. List

b. String

c. Dictionary

d. None of the above

10 / 40

10.

Which is the correct operator for power(xy)?

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

11 / 40

11. The len() method to return the length of an array

12 / 40

12.

What will be the output of below Python code?

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

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

13 / 40

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

a. 5

b. 3

c. 6

d. 7

14 / 40

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

15 / 40

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

16 / 40

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

17 / 40

17. The format() method takes the passed arguments

18 / 40

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

19 / 40

19. Indentation refers to the spaces at the beginning of a code line.

20 / 40

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

21 / 40

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

22 / 40

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

23 / 40

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

24 / 40

24. A loop block in python starts with a –

a) ; (semicolon)

b) , (comma)

c) : (colon)

d) # (hash)

25 / 40

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

26 / 40

26. Python relies on indentation?

27 / 40

27.

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.

28 / 40

28.

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

29 / 40

29.

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

30 / 40

30.

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.

31 / 40

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

32 / 40

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

33 / 40

33. Identity operators are used to compare the objects, not if they are equal, but if they are actually the same object, with the same memory location

34 / 40

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

35 / 40

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

36 / 40

36. python file can also run on command line

37 / 40

37. Python is an interpreted programming language

38 / 40

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

39 / 40

39.

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

40 / 40

40.

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

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.