[miniorange_social_sharing]
[TheChamp-Login]

/40

Final Exam for Python for Everyone (A to Z)

BEST OF LUCK!!!

1 / 40

1.

 ____________________ 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

2 / 40

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

3 / 40

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

4 / 40

4.

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

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

5 / 40

5. Comparison operators are not  used to compare two values

6 / 40

6. Python relies on indentation?

7 / 40

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

8 / 40

8.

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

9 / 40

9. Python is an interpreted programming language

10 / 40

10. What is the index value of ‘i’ in string “Learning”

a. 5

b. 3

c. 6

d. 7

11 / 40

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

12 / 40

12. Python is a  high-level programming language.

13 / 40

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

14 / 40

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

15 / 40

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

16 / 40

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

17 / 40

17. Variables that are created outside of a function

18 / 40

18.

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

19 / 40

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

20 / 40

20.

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

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

21 / 40

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

22 / 40

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

23 / 40

23.

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

24 / 40

24.

Which of the following statement is a function call?

a. call sum( )

b. def sum( )

c. sum( )

d. function sum( )

25 / 40

25. Comments can be used to explain Python code.

26 / 40

26. Python can be install on both  Linux and  Windows

27 / 40

27.

Which keyword is used to begin the definition of a function?

a. Define

b. DEF

c. def

d. Def

28 / 40

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

29 / 40

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

30 / 40

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

31 / 40

31.

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

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

32 / 40

32.

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

33 / 40

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

34 / 40

34.

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.

35 / 40

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

36 / 40

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

37 / 40

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

38 / 40

38.

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

a. True

b. False

39 / 40

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

40 / 40

40. Python has various versions available

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.