Python Test 1 - Core Data types

Which of these in not a core data type?
Given a function that does not return any value, What value is thrown by default when executed in shell.
What will be the output of the following Python code?
str="hello"
str[:2]
Which of the following will run without errors?
What is the return type of function id?
In python we do not specify types, it is directly interpreted by the compiler, so consider the following operation to be performed.
x = 13 ? 2

objective is to make sure x has a integer value, select all that apply (python 3.xx)
What error occurs when you execute the following Python code snippet?
apple = mango
What will be the output of the following Python code snippet?
def example(a):
a = a + '2'
a = a*2
return a
example("hello")
What data type is the object below?
L = [1, 23, 'hello', 1]
In order to store values in terms of key and value we use what core data type.
Which of the following results in a SyntaxError?
What is the average value of the following Python code snippet?
grade1 = 80
grade2 = 90
average = (grade1 + grade2) / 2
Select all options that print.
hello-how-are-you
What is the return value of trunc()?
Schreibe einen Kommentar