-
for i in [0,2,3]:
if i%2 == 0:
print(“even”)
elif i%2 !=0:
print(“nil”)
else:
print(“odd”)
-
If we execute the expression foo = ‘abc’ * 10 what is the result?
-
x = “”
while x != “xx”:
x += “x”
print(x)
-
def f(u,y=)
for I in range(u):
y:append(i*i)
Print(y)
f(6)
f(6, [4,1,5])
f(6)
Hello, everyone, I need your kind solution and explanation on the above questions.
This feels suspiciously like homework. What have you go so far?
thanks for your kind response. I need an explanation to understand the syntax very well.
What do you already have? We aren’t a ‘do your homework’ service here.
system
Closed
5
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.