Looking for COSC121-25S1 - Introduction to Computer Programming test answers and solutions? Browse our comprehensive collection of verified answers for COSC121-25S1 - Introduction to Computer Programming at learn.canterbury.ac.nz.
Get instant access to accurate answers and detailed explanations for your course questions. Our community-driven platform helps students succeed!
What does the following code print?
number = 45
if number >= 70:
print("Luke, I am your father")
elif number >= 45:
print("I'll be Bach")
elif number > 15:
print("...Bond. James Bond.")
else:
print("Go ahead, make my day")
1number = 45if number >= 70: print("Luke, I am your father")elif number >= 45: print("I'll be Bach")elif number > 15: print("...Bond. James Bond.")else: print("Go ahead, make my day") ההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXWhat is the output from the following program? Try to work out the answer rather than just running the code.
number = 12
if number < 0:
print("Don't be so negative")
print("Always look on the bright side of life")
Which of the following evaluates to False?
Which of the following boolean expressions evaluate to True?
Given that:
name = "Angus Grunge"
age = 24
address = "23 Somewhere Lane, Dunedin 8054"
which of the following boolean expressions evaluate to True? Try to work out the answer yourself rather than just typing the expressions into the computer like a robot.
A Widget is considered to be small if it is less than 10 units tall. Given that a particular Widget's height has been stored in a variable named height, what would be a suitable assignment so that the variable is_small will indicate whether the Widget is small or not?
If height is 10 and width is 20, which of the following boolean expressions evalute to True? You should try to work out the answers yourself, rather than mindlessly typing the expressions into Python to see what happens.