Intro to Scripting 1 - Python

Which of the following will not print the string "hello world"
print("'Hello World'")
print("""Hello World""")
print("Hello World")
print('Hello World')
print("'Hello World'")
Which of the following statements is true
In python it is not necessary to enclose integers in quotation marks
in python integers must be declared at the beginning of the script
in Python integers must be enclosed in quotation marks
python does not support the use of integers
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))
print("X=$X")
print("X=(X)")
print("X= +str(X)")
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}")
print("Today is (day)")
print("f"Today is (day)"")
print("Today is " + {day})
print(f"Today is {day}")
What is the command to define a function called "check" in python
def check():
def function(check):
def check();
def function(check);
def check():
Which of the following scripts will print the following: 1 2 3
i=1 while i <4: print (i) i += 1
for i in [1,2,3] print (i)
i =0 i =i+1 while i <=3: print (i)
i =1 for i <4: print (i)
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
there is no else statement therefore the statement will not work
the print command wont work because a and b should be {a} and {b}
nothing this will work fine
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)
calculator(a=2,b=3)
calculator("2","3")
calculator("2,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")
day="Monday"
calendar(Monday)
day("Monday")
calendar("Monday")
Your Score
Score Label
Score Summary