[miniorange_social_sharing]
[TheChamp-Login]

/40

Final Exam for Python for Everyone (A to Z)

BEST OF LUCK!!!

1 / 40

1.

How to copy one list to another in python?

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

2 / 40

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

3 / 40

3. Arrays are used to store multiple values in one single variable.

4 / 40

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

5 / 40

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

6 / 40

6.

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

7 / 40

7. Most recent major version of Python is Python 3

8 / 40

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

9 / 40

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

10 / 40

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

11 / 40

11.

Which of the following precedence order is correct in Python?

  1. Parentheses, Exponential, Multiplication, Division, Addition, Subtraction
  2. Multiplication, Division, Addition, Subtraction, Parentheses, Exponential
  3. Division, Multiplication, Addition, Subtraction, Parentheses, Exponential
  4. Exponential, Parentheses, Multiplication, Division, Addition, Subtraction

12 / 40

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

13 / 40

13. Python is a  high-level programming language.

14 / 40

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

15 / 40

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

16 / 40

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

17 / 40

17. Is there any comments in  following codes

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

 

18 / 40

18.

What is the value of the expression 100 / 25?

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

19 / 40

19. Who developed Python Programming Language?

20 / 40

20. The for loop does not require an indexing variable to set beforehand

21 / 40

21.  ________ in Python is a counter-controlled loop.

a) for

b) while

c) Both (a) and (b)

d) None of the above

22 / 40

22. A loop block in python starts with a –

a) ; (semicolon)

b) , (comma)

c) : (colon)

d) # (hash)

23 / 40

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

24 / 40

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

25 / 40

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

26 / 40

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

27 / 40

27.

 What is output of: 35 == 35.0

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

28 / 40

28. Comparison operators are not  used to compare two values

29 / 40

29. The format() method takes the passed arguments

30 / 40

30.

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

31 / 40

31. break in Python is used ______________

a) To restart a loop

b) Terminate a loop

c) To jump in between the loop

d) None of the above

32 / 40

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

33 / 40

33. python file can also run on command line

34 / 40

34.

Following is an example of ___________________

sv = “csiplearninghub.com”

a. List

b. String

c. Dictionary

d. None of the above

35 / 40

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

36 / 40

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

37 / 40

37.

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.

38 / 40

38. Is Python code compiled or interpreted?
a) Python code is both compiled and interpreted
b) Python code is neither compiled nor interpreted
c) Python code is only compiled
d) Python code is only interpreted

39 / 40

39.

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

40 / 40

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

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.