[miniorange_social_sharing]
[TheChamp-Login]

/40

Final Exam for Python for Everyone (A to Z)

BEST OF LUCK!!!

1 / 40

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

2 / 40

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

3 / 40

3.

What is the value of the expression 100 / 25?

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

4 / 40

4. Python can connect to database systems.

5 / 40

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

6 / 40

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

a) for

b) while

c) Both (a) and (b)

d) None of the above

7 / 40

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

8 / 40

8.

Which of the following is not a keyword in Python language?

  1. val
  2. raise
  3. try
  4. with

9 / 40

9.

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

10 / 40

10. Comments starts with a #

11 / 40

11. Official site of python is www.python.org

12 / 40

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

13 / 40

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

14 / 40

14.

What will be the output of above Python code?

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

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

15 / 40

15. A variable name can only contain alpha-numeric characters and
underscores

16 / 40

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

17 / 40

17. With the break statement we can stop the loop before it has looped through all the items

18 / 40

18. Comments can be used to make the code more readable.

19 / 40

19.

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

a. 2

b. 3

c. 5

d. Multiple times

20 / 40

20. A loop block in python starts with a –

a) ; (semicolon)

b) , (comma)

c) : (colon)

d) # (hash)

21 / 40

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

22 / 40

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

23 / 40

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

24 / 40

24. python file can also run on command line

25 / 40

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

26 / 40

26. Who developed Python Programming Language?

27 / 40

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

28 / 40

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

29 / 40

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

30 / 40

30. The format() method takes unlimited number of arguments

31 / 40

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

32 / 40

32.

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

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

33 / 40

33. Python is a  high-level programming language.

34 / 40

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

35 / 40

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

36 / 40

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

37 / 40

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

38 / 40

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

39 / 40

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

40 / 40

40.

What will the below Python code will return?

If str1="save paper,save plants"str1.find("save")

A. It returns the first index position of the first occurance of “save” in the given string str1.
B. It returns the last index position of the last occurance of “save” in the given string str1.
C. It returns the last index position of the first occurance of “save” in the given string str1.
D. It returns the first index position of the first occurance of “save” in the given string str1.

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.