[miniorange_social_sharing]
[TheChamp-Login]

/40

Final Exam for Python for Everyone (A to Z)

BEST OF LUCK!!!

1 / 40

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

2 / 40

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

3 / 40

3. A variable name must start with a letter or the underscore character

4 / 40

4.

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

a. 2

b. 3

c. 5

d. Multiple times

5 / 40

5. To insert characters that are illegal in a string, use an escape character

6 / 40

6.

What will be the output of above Python code?

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

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

7 / 40

7.

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

8 / 40

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

9 / 40

9. Comparison operators are not  used to compare two values

10 / 40

10.

Following is an example of ___________________

sv = “csiplearninghub.com”

a. List

b. String

c. Dictionary

d. None of the above

11 / 40

11.

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

12 / 40

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

13 / 40

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

14 / 40

14.

 ____________________ can be defined as a named group of instructions that accomplish a specific task when it is invoked/called.

a. Function

b. Datatype

c. Token

d. Operator

15 / 40

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

16 / 40

16.

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

17 / 40

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

18 / 40

18.

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.

19 / 40

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

20 / 40

20. Variables that are created outside of a function

21 / 40

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

22 / 40

22. All keywords in Python are in _________
a) Capitalized
b) lower case
c) UPPER CASE
d) None of the mentioned

23 / 40

23. Snake Case
Each word is separated by an underscore character:

24 / 40

24.

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

25 / 40

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

26 / 40

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

27 / 40

27. Python can connect to database systems.

28 / 40

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

29 / 40

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

30 / 40

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

31 / 40

31. Extension of all Python  Programme are .py

32 / 40

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

33 / 40

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

34 / 40

34. An array can hold many values under a single name

35 / 40

35. The for loop in Python is an _____________

a) Entry Controlled Loop

b) Exit Controlled Loop

c) Both of the above

d) None of the above

36 / 40

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

37 / 40

37. A loop block in python starts with a –

a) ; (semicolon)

b) , (comma)

c) : (colon)

d) # (hash)

38 / 40

38.

What do we use to define a block of code in Python language?

  1. Key
  2. Brackets
  3. Indentation
  4. None of these

39 / 40

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

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.