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

2 / 40

2.

What will be the output of above Python code?

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

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

3 / 40

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

4 / 40

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

5 / 40

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

6 / 40

6.

Following is an example of ___________________

sv = “csiplearninghub.com”

a. List

b. String

c. Dictionary

d. None of the above

7 / 40

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

8 / 40

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

9 / 40

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

10 / 40

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

11 / 40

11. Extension of all Python  Programme are .py

12 / 40

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

13 / 40

13.

Which of the following statement will execute in last?

def s(n1): #Statement 1      print(n1) #Statement 2n2=4 #Statement 3s(n2) #Statement 4

a. Statement 1

b. Statement 2

c. Statement 3

d. Statement 4

14 / 40

14. Python relies on indentation?

15 / 40

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

16 / 40

16. Who developed Python Programming Language?

17 / 40

17.

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

a. 2

b. 3

c. 5

d. Multiple times

18 / 40

18. Python can be install on both  Linux and  Windows

19 / 40

19. Python will give you an error if you skip the indentation

20 / 40

20.

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

a. [ ]

b. { }

c. ( )

d. None of the above

21 / 40

21.

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

22 / 40

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

23 / 40

23.

The most important object defined in NumPy is an N-dimensional array type called?

A. ndarray
B. narray
C. nd_array
D. darray

24 / 40

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

25 / 40

25.

 What is output of: 35 == 35.0

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

26 / 40

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

27 / 40

27. You can also have an else without the elif

28 / 40

28. With the for loop we can execute a set of statements

29 / 40

29. Suppose t = (1, 2, 4, 3), which of the following is incorrect?
a) print(t[3])
b) t[3] = 45
c) print(max(t))
d) print(len(t))

30 / 40

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

31 / 40

31. Is there any comments in  following codes

i = 1while True:    if i%3 == 0:        break    print(i)     i + = 1

 

32 / 40

32.

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

a. True

b. False

33 / 40

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

i = 1while True:    if i%3 == 0:        break    print(i)     i + = 1

a) 1 2
b) 1 2 3
c) error
d) none of the mentioned

34 / 40

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

35 / 40

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

36 / 40

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

37 / 40

37. Strings in python are surrounded by either single quotation marks, or double quotation marks

38 / 40

38.

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

39 / 40

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

40 / 40

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

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.