[miniorange_social_sharing]
[TheChamp-Login]

/40

Final Exam for Python for Everyone (A to Z)

BEST OF LUCK!!!

1 / 40

1. Python has various versions available

2 / 40

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

3 / 40

3.

Which of the following statement is a function call?

a. call sum( )

b. def sum( )

c. sum( )

d. function sum( )

4 / 40

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

5 / 40

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

6 / 40

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

a. 5

b. 3

c. 6

d. 7

7 / 40

7.

Which is the correct operator for power(xy)?

  1. X^y
  2. X**y
  3. X^^y
  4. None of the mentioned

8 / 40

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

9 / 40

9.

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

10 / 40

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

11 / 40

11. Comments can’t be used to prevent execution when testing code.

12 / 40

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

13 / 40

13. Comments can be used to explain Python code.

14 / 40

14.

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

a. Define

b. DEF

c. def

d. Def

15 / 40

15.

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

16 / 40

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

17 / 40

17.

The function can be called in the program by writing function name followed by ____

a. [ ]

b. { }

c. ( )

d. None of the above

18 / 40

18.

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

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

19 / 40

19.

 What is output of: 35 == 35.0

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

20 / 40

20. Python can connect to database systems.

21 / 40

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

22 / 40

22.

What will be the output of below Python code?

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

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

23 / 40

23. What does the following code print?

x = -10if x < 0:    print("The negative number ",  x, " is not valid here.")print("This is always printed")
a.This is always printedb.The negative number -10 is not valid hereThis is always printedc.The negative number -10 is not valid here

24 / 40

24. Indentation refers to the spaces at the beginning of a code line.

25 / 40

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

26 / 40

26.

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

27 / 40

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

28 / 40

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

29 / 40

29. python has two primitive loop commands:

  • while loops
  • for loops

30 / 40

30. Python can be treated in a procedural way, an object-oriented way or a functional way.

31 / 40

31. Arithmetic operators are used with numeric values to perform common mathematical operations

32 / 40

32.

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

33 / 40

33. Who developed Python Programming Language?

34 / 40

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

35 / 40

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

36 / 40

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

37 / 40

37. Extension of all Python  Programme are .py

38 / 40

38. A loop block in python starts with a –

a) ; (semicolon)

b) , (comma)

c) : (colon)

d) # (hash)

39 / 40

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

40 / 40

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

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.