+ 2
a = {1, 2, 3} b = {0, 3, 4, 5} print(a & b)
my answer is {3} but its need for 2 more answer any one can help?
4 Respuestas
+ 8
rad ,
can you please complete your question:
> give a complete task description what the code should do.
+ 1
a = {1, 2, 3}
b = {0, 3, 4, 5}
print(a & b)
# anser:
{
3
}
# Each character must be entered separately
+ 1
You answered {3} but there were room for 2 more characters to type in the answer input box. That was because it expected {3.0} as answer.
I cannot quite explain why. Maybe someone with more knowlwdge can confirm these overloads for bitwise operators always store the results in `float` even though both operands only contain integers in this case.
+ 1
{ 3 }