teapawtteapawt
$
  • Timeline
  • Grid
  • Gallery
Coding Computing Coach (@CodingComputing) profile picture
Coding Computing Coach@CodingComputingAug 15
Replying to @PythonPr
Answer: B Solution: x and y are sets. What does the `-` do on sets? It computes the "set difference". The diagram makes it clear (credit in description): The shaded region is the part of A which is not in B. That is the set difference. +
https://mathmonks.com/sets/set-operations#Difference

ALT https://mathmonks.com/sets/set-operations#Difference

1
1
5
257
Coding Computing Coach (@CodingComputing) profile picture
Coding Computing Coach@CodingComputingAug 14
Replying to @PythonPr
Answer: A Solution: a and b are sets. The code computes a ^ b What is this operator ^? The operator's action is called Symmetric Difference. The diagram shows it the symmetric difference of A and B as shaded: +
Source: https://math.stackexchange.com/a/2948656

ALT Source: https://math.stackexchange.com/a/2948656

1
1
4
175
Coding Computing Coach (@CodingComputing) profile picture
Coding Computing Coach@CodingComputing18 Dec 2025
Replying to @CodingComputing @PythonPr
In Python there is a module called `decimal` which has you covered. It is designed specially for exactly representing decimal numbers. There you won't have such problems. See image for demo. I hope this answer was helpful!
Image from Coding Computing Coach (@CodingComputing)
6
102
Coding Computing Coach (@CodingComputing) profile picture
Coding Computing Coach@CodingComputing17 Dec 2025
Replying to @CodingComputing @PythonPr
You can count backwards from the rightmost item. The 2nd-last is at index -2, the 3rd-last at -3, and so on. See image: Applying to this question +
Image from Coding Computing Coach (@CodingComputing)
1
1
59
Coding Computing Coach (@CodingComputing) profile picture
Coding Computing Coach@CodingComputing16 Dec 2025
Integrating solutions
Image from Coding Computing Coach (@CodingComputing)
87
Coding Computing Coach (@CodingComputing) profile picture
Coding Computing Coach@CodingComputing12 Dec 2025
Which of the following snippets is preferable?
Image from Coding Computing Coach (@CodingComputing)
3
121
Coding Computing Coach (@CodingComputing) profile picture
Coding Computing Coach@CodingComputing12 Dec 2025
Replying to @CodingComputing @PythonPr
BONUS quick summary of how to decompose a list comp:
Image from Coding Computing Coach (@CodingComputing)
1
42
Coding Computing Coach (@CodingComputing) profile picture
Coding Computing Coach@CodingComputing8 Dec 2025
`extend` and `append` are both list methods that seem similar But don't confuse `extend` with `append` `append` just adds the argument as one item to the list `extend` unpacks the iterable and adds each item See image for example:
Image from Coding Computing Coach (@CodingComputing)
3
197
Coding Computing Coach (@CodingComputing) profile picture
Coding Computing Coach@CodingComputing5 Dec 2025
Python quiz
Image from Coding Computing Coach (@CodingComputing)
1
1
1
172
Coding Computing Coach (@CodingComputing) profile picture
Coding Computing Coach@CodingComputing1 Oct 2025
Which one do you choose?
Image from Coding Computing Coach (@CodingComputing)
217
Coding Computing Coach (@CodingComputing) profile picture
Coding Computing Coach@CodingComputing10 Aug 2025
Novel idea of the century! They discovered the importance human expertise
Image from Coding Computing Coach (@CodingComputing)
1
253
Coding Computing Coach (@CodingComputing) profile picture
Coding Computing Coach@CodingComputing25 Jul 2025
Programmers, agree?
Image from Coding Computing Coach (@CodingComputing)
1
1
8
290
Coding Computing Coach (@CodingComputing) profile picture
Coding Computing Coach@CodingComputing6 Jul 2025
AI vs Imposter Syndrome
Image from Coding Computing Coach (@CodingComputing)
230
Coding Computing Coach (@CodingComputing) profile picture
Coding Computing Coach@CodingComputing25 Jun 2025
Software docs sometimes:
Image from Coding Computing Coach (@CodingComputing)
1
180
Coding Computing Coach (@CodingComputing) profile picture
Coding Computing Coach@CodingComputing29 May 2025
Python Quiz: Which of the following code snippets will run for a longer time? Why?
Image from Coding Computing Coach (@CodingComputing)
1
1
342
Load more