100% Actual Solutions.
Which of the following is NOT a kind of client-side programming (computing) language?
A. HTML
B. Python
C. CSS
D. JavaScript correct answers B. Python
Which of the following is NOT a kind of server-side programming language?
A. HTML
B. Python
C. Java
D. PHP correct answers A. HTML
Which of the following statements is NOT correct?
A. Python is an open-source programming language
B. Python needs to be compiled
C. Python is an object-oriented programming (OOP) language
D. Python is interpreted by a Python interpreter correct answers B. Python needs to be compiled
Which of the following will return an error?
A. print(round(15387-128) + int(412//23))
B. print('23 % 11 = ' + 23 % 11)
C. print('Today\'s a good day')
D. print(4>4) correct answers B. print('23 % 11 = ' + 23 % 11)
Which of the following can be used for exponentiation?
A. //
B. **
C. %
D. * correct answers B. **
Which of the following statements are true? Select all that apply.
A. A variable is a symbolic name for (or reference to) a value.
B. A variable can be used to store all kinds of stuff including user input.
C. Variable names are case-sensitive
D. You can assign a variable a value and then reassign the same variable a different value later
on in your code. correct answers All of the above
Which of the following is a comparison operator?
A. /
B. and
C. **
D. > correct answers D. >
,What data type could be used to store the phone number 123-456-7890?
A. int
B. float
C. bool
D. str correct answers D. str
Which of the following is the correct syntax to check if the variable x is equal to 5?
A. if (x != 5)
B. if (x = 5)
C. if (x <= 5)
D. if (x == 5) correct answers D. if (x == 5)
What does the following code output: x = 5, y = "John", z = "UIO", print(x + x + z)?
A. 10John
B. 5 UIO
C. TypeError
D. 10UIO correct answers C. TypeError
What is the limit to the number of elif statements that can be implemented after an if statement?
A. 5
B. 10
C. 100
D. There is no limit correct answers D. There is no limit
What is used to define a block of code (body of loop, function, etc.) in Python?
A. Indentation
B. Parenthesis
C. Quotation
D. Curly braces correct answers A. Indentation
What is used to take input from the user in Python?
A. get()
B. input()
C. scanf()
D. <> correct answers B. input()
When defining a variable, which of the following is allowed?
A. The variable name can start with a digit.
B. The variable name can start with an underscore.
C. The variable name can contain a space.
D. The variable name can have symbols like @, #, $, etc. correct answers B. The variable name
can start with an underscore.
Which operator is used to compare two numbers for equality?
A. =
B. +=
, C. ==
D. != correct answers C. ==
A statement using the or operator results in True if _______. Select all that apply.
A. Both operands are true
B. Both operands are false
C. First operand is true
D. Either of the operands is true correct answers A, C, and D
A statement using the and operator results in True if _______.
A. Both operands are true
B. Both operands are false
C. First operand is true
D. Either of the operands is true correct answers A. Both operands are true
Which marks can be used to give comments?
A. #
B. """..."""
C. '''...'''
D. All of the above correct answers D. All of the above
What is the output of the following code: print(3 >= 3)?
A. 3>=3
B. True
C. False
D. None correct answers B. True
What is the type of age: 1, age = input("How old are you?")?
A. type
B. int
C. str
D. float correct answers C. str
Which of the following is used to represent a List in Python?
A. []
B. {}
C. ()
D. All of the above correct answers A. []
What will be the result of the following script: x = [1, 2, 3, 4], print(x[4])?
A. x
B. 4
C. An error message
D. None of the above correct answers C. An error message