What is wrong with this code? def my_func(var): if var = "the sky": print("wow.") elif var = "the ocean": print("wow.") else: print("what?")单项选择题
A
Syntax error: incorrect use of print statement
B
Incorrect test for equality
C
Indentation error
D
Missing variable declaration
登录即可查看完整答案
我们收录了全球超50000道真实原题与详细解析,现在登录,立即获得答案。
类似问题
Which conditional expression should be used to determine if the variable x is equal to 7?
Question at position 20 Examine the code: class Person: def __init__(self, name): self.name = name def __eq__(self, other): return self.name == other What is the result of: p = Person("Alice")print(p == "Alice") Raises a TypeErrorTrueNoneFalseClear my selection
What would be the output of the following code? a = 5 b = a c = 6 print(c == a)
A 62.9 kg lady is standing on a weighing scale in an elevator as shown in the diagram below. Assume gravitational acceleration = 15 ms-2 Given that the elevator is accelerating upwards at 3.7 ms-2 , determine the magnitude of the normal force on the lady.
更多留学生实用工具
希望你的学习变得更简单
加入我们,立即解锁 海量真题 与 独家解析,让复习快人一步!