[miniorange_social_sharing]
[TheChamp-Login]

/40

Final Exam for Python for Everyone (A to Z)

BEST OF LUCK!!!

1 / 40

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

2 / 40

2. python file can also run on command line

3 / 40

3.

What will be the output of below Python code?

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

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

4 / 40

4. python has two primitive loop commands:

  • while loops
  • for loops

5 / 40

5.

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.

6 / 40

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

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

9 / 40

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

10 / 40

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

11 / 40

11. Which of the following is False regarding loops in Python?

a)Loops are used to perform certain tasks repeatedly.

b) while loop is used when multiple statements are to executed repeatedly until the given condition becomes true.

c) while loop is used when multiple statements are to executed repeatedly until the given condition becomes false.

d) for loop can be used to iterate through the elements of lists.

12 / 40

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

13 / 40

13. Variable names are case-sensitive

14 / 40

14. Which of the following is the use of function in python?
a) Functions are reusable pieces of programs
b) Functions don’t provide better modularity for your application
c) you can’t also create your own functions
d) All of the mentioned

15 / 40

15. A variable name cannot start with a number

16 / 40

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

17 / 40

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

18 / 40

18.

Which one of the following is the correct extension of the Python file?

  1. .py
  2. .python
  3. .p
  4. None of these

19 / 40

19.

What is the value of the expression 100 / 25?

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

20 / 40

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

21 / 40

21. Variables that are created outside of a function

22 / 40

22. Python can be install on both  Linux and  Windows

23 / 40

23.

Following is an example of ___________________

sv = “csiplearninghub.com”

a. List

b. String

c. Dictionary

d. None of the above

24 / 40

24. Python is an interpreted programming language

25 / 40

25. Camel Case
Each word, except the first, starts with a capital letter:

26 / 40

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

27 / 40

27.

How to copy one list to another in python?

A. l1[] = l2[]
B. l1[] = l2
C. l1[] = l2[:]
D. l1 = l2

28 / 40

28.

What is the data type of print(type(10))

29 / 40

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

30 / 40

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

31 / 40

31.

Which function overloads the >> operator?

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

32 / 40

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

33 / 40

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

34 / 40

34.

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

35 / 40

35. What is another word for ‘iteration’ ?

a) Selection

b) Assignment

c) Sequencing

d) Repetition

36 / 40

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

37 / 40

37. Python has various versions available

38 / 40

38. Most recent major version of Python is Python 3

39 / 40

39. Extension of all Python  Programme are .py

40 / 40

40.

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

a. 2

b. 3

c. 5

d. Multiple times

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.