Introduction
You are sitting with your coworker, having lunch, and bragging to him/her about the latest and supposedly greatest project you've been working on. Getting sick and tired of your constant showcase of egoism, he/she gives you a challenge just so you'll shut up. Being the egoistic and ...
The task
Write a program or function that takes a traffic intersection structure and outputs the sequence, in which vehicles will pass.
The output should contain at most four lines with the following format #. x->y\n, where # is a sequence number number, followed by the dot ., x and y are chara...
Determine all functions $f:\mathbb{R}\rightarrow\mathbb{R}$ such that $$f(x-f(y))=f(-x)+(f(y)-2x)\cdot f(-y), \quad \forall x,y \in \mathbb{R}$$
It's easy to see that $f(x)=x^2$ is a function satisfying the above equation. Thus I thought it would be wise to first prove that $f$ is an even fu...
Think of it like this. reversed(x) reverses a list. x.reverse() tells a list to reverse itself. The former should not be an instance method, the latter should.