Which of the following will not print the string "hello world"
print("'Hello World'")
Which of the following statements is true
In python it is not necessary to enclose integers in quotation marks
If the variable X is set to 5 which code will print the text "X=5"
print("X="+str(X))
A python script has the variable "day" set to "Monday". Which of the following commands is syntactically correct?
print(f"Today is {day}")
What is the command to define a function called "check" in python
def check():
Which of the following scripts will print the following:
1
2
3
i=1
while i <4:
print (i)
i += 1
What is wrong with the following code:
a=1
b=2
if a>b:
print (f"a is bigger than b")
elseif b<a
print (f"b is bigger than a")
elseif should be elif
A python script has the following function:
def calculator(a,b):
print(a*b)
What code is needed to call the funcation, and set a=2 and b=3?
calculator(2,3)
A python fscript has the following function:
def calendar(day):
print(f"Today is {day}")
What would be the code needed to print "Today is Monday"
calendar("Monday")