Why does the NameError occur despite globally declaring the variables
Short description of the scoping rules?
Is there a closed form expression for $1 + x + x^{4} + x^{9}+x^{16}+x^{25} +..+x^{k^2}$? We all know what the sum of a geometric series is  $1 + x + x^2 + x^3 + ... + x^k = \frac{x^{k+1} - 1}{x - 1}$ .  I was wondering if similar formulas exist in case the exponents  form some other sequence, for example are squares or cubes of positive integers? Falsely accused witch befriends transforming dragon she was to be sacrificed to Story is in a medievalish setting and starts with a woman who has been falsely accused of being a witch being taken by 2 men to be sacrificed to a dragon.  She ends up befriending the (male) dragon, who is able to transform into various forms, including human, and can speak only the language of whatever form he is in. e.g. can speak English in human form, but can't in dragon form.  He needs to return to his dragon form every day at sunrise or he dies.  Contact with iron or steel causes him pain and prevents him from transforming.  Near the end of the book, he's been put in handcuffs by one of the two men from the start and the woman has to get the assistance of the other one (village blacksmith?) to remove them before sunrise, which they manage to do just in time.  I think I read it maybe 10 years ago.    I also remember it was a very short book, probably only about 100 pages. htl5 voice recording with isualization Mean Value Theorem: $\frac{2}{\pi}<\frac{\sin x}{x}<1$ I need to show that $\dfrac{2}{\pi}&lt;\dfrac{\sin(x)}{x}&lt;1$ for $0&lt;x&lt;\dfrac{\pi}{2}$.  I know I need to use the mean value theorem, would I just say that since $f$ is continuous in the interval (call it I).  We know $\exists c\in I$ such that $f'(c) = \dfrac{f\left(\dfrac{\pi}{2}\right)-f(0)}{\dfrac{\pi}{2}}$. I don't know where this is going though.  Also, would I need to show $\lim_{x \to 0}\dfrac{\sin(x)}{x} = 1$? Is there a way to do this without L'H Rule? Is it coherent to extend $\mathbb{R}$ with a reciprocal of $0$? I'm sure this is an obvious question, but I'm having trouble finding the right words to type into Google.  I know that the definition of a ring allows that the additive identity not have a multiplicative inverse, but is this a requirement?  Specifically, is something like $\mathbb{R}\!\left[\frac{1}{0}\right]$ such that $\frac{1}{0} \cdot 0 = 1$ a ring, or does some contradiction arise from allowing the additive identity to have a multiplicative inverse? Help identifying an error type "tried to help me learning" I have a friend from Russia who is trying to learn English and recently used the sentence "He tried to help me learning..." (implied: the English language)  It is obviously wrong and I corrected it telling her that she was supposed to say: "He tried to help me learn.", but I have a hard time explaining to her why it is incorrect since I'm not an expert on grammar either.  Is it a case of confusing the present simple and present continuous or does it have something to do with gerunds and infinitives? Any help would be highly appreciated! How can I create an instance of the Java console inside of a GUI panel? $(x^3+xy^2-y)dx+(y^3+x^2y+x)dy=0$ I tried to find on Wolfram Alpha but it showed only the solution not in step-by-step, I know that the factor is $\frac{1}{x^2+y^2}$ but how to find it? Topologist's Sine Curve: A rigorous proof of why $\overline{S} = S \cup V$ Let $S$ and $V$ be the following subsets of $\mathbb{R}^2$.  $$ S = \left\{ \ x \times \sin \frac{1}{x} \ \colon  \ 0 &lt; x \leq 1 \ \right\}, \qquad V = \left\{ \ 0 \times y \ \colon \ -1 \leq y \leq 1 \ \right\} = \{ 0 \} \times [-1, 1]. $$ Then how to show rigorously that the closure $\overline{S}$ of $S$ is given by  $$ \overline{S} = S \cup V? $$  By rigorously, I mean using the smme kind of argument as is used in real analysis or topology, such as in (most of) the proofs in Rudin or Munkres.   Intuitively, it is clear that as $x \to 0+0$, then $\sin \frac{1}{x}$ will fluctuate its full range of $[-1, 1]$, and for any point $0 \times y$, where $y \in [-1, 1]$, there will be points of $S$ arbitrarily close to it.   But I'm unable to rigorously show this. My mortgage came up for renewal right at the time in 2009 when UK interest rates hit rock bottom. This was unprecidented, and most financial advice was to take out a fixed-rate mortgage. So I perhaps went overboard and got one for ten years.  Five years on, interest rates haven't moved and I'm losing money on it to the tune of £100 a month. Obviously, this is ongoing: so that decision has cost me about £5000 in real terms so far. It'll come to a lot more by the end of the mortgage, unless interest rates rise.  Being fixed rate, it's been designed so you can't get out early. If I decide to end the mortage, it'll cost me £1,000 per year of the mortgage remaining - which is roughly what I'm losing anyway, so that seems a bad idea.   I can overpay by up to £500 per month. However, doing this doesn't help pay down the mortgage at all: the total is just added up and will cause the mortgage to end early, by a period dependent on the overpayment total.   This seems to me to be a very bad idea because hoping interest rates rise over the next five years is the only hope I have of making good on some of the losses that I've made.   Is this sensible thinking? If so, is there anything at all I can do to try and ameliorate the financial pain this product is causing me? I recently dismissed Dogmeat in favor of Codsworth, and I'm fairly sure I sent him to Sanctuary Hills. However, I've had a fairly detailed look around the place and I haven't found him yet. Does anyone know where he is? The problem is stated as follows:  "Let $R$ be a Noetherian ring and $\theta$ be a ring homomorphism from $R$ to $R$. Show that if $\theta$ is surjective then it is also injective."  Regardless of the right solution, I don't understand why is the following wrong:     We have $\theta: R\to R$. By the isomorphism theorem $R/\ker\theta\cong\operatorname{Im}\theta$. Since $\operatorname{Im}\theta = R$, it follows $\ker\theta =0$, so it's injective.   Harsh criticism will be appreciated. Thanks. If we're implementing , why don't we also require that users have at least 1.5 times the amount of reputation needed to ask their current question in order to answer their current question?  I believe this would really reduce the amount of non-answers that should have been edits to the original question, or perhaps a comment under another answer.  Edit  Inspired by marcog's excellent suggestion , perhaps it would make more sense to set a minimum amount of time that must pass before you can answer your own question. New users would need to wait in the neighborhood of six hours, while users with more reputation could answer their own question within minutes if they discovered the solution on their own.  This would get in the way of the behavior that we don't want, which is people posting answers that should have been edits while not annoying most. How to run batch file without admin privillege? Why are the shebang parts of the following elementary scripts not working:  $ cat hello.sh #! /bin/sh echo Hello $ ./hello.sh bash: ./hello.sh: /bin/sh^M: bad interpreter: No such file or directory  $ cat hello.py #! /usr/bin/env python3 print("Hello") $ ./hello.py : No such file or directory   whereas calling the interpreter manually is working:  $ sh hello.sh Hello $ python3 hello.py Hello Let $f$ be an analytic isomorphism on the unit disc $D$, find the area of $f(D)$ Let $f$ have power series $f(z) = \sum_{n=1}^\infty a_n z^n$ in $D$, then prove that   $\mathrm{area}\, f(D) = \sum_{n=1}^\infty n \,|a_n|^2$.  Note: We define $\mathrm{area}\, S = \iint_S \mathrm{d}x\,\mathrm{d}y$.  I presume the way to do this is to take the integral $$\iint_{f(D)} \mathrm{d}x\,\mathrm{d}y = \iint_D \mathbf{J}_f (x+iy) \,\mathrm{d}x\,\mathrm{d}y = \int_0^1 \int_0^{2\pi} r \mathbf{J}_f (r e^{i \theta}) \mathrm{d}\theta\,\mathrm{d}r,$$ and letting $\gamma_r : [0,2\pi]\to\Bbb{C}, \,\gamma_r (\theta) = r e^{i\theta},\, \gamma_r '(\theta) = i\gamma_r (\theta),$ then we get $$\mathrm{area}\,f(D) = \int_0^1 \int_{\gamma_r}\frac{\lvert f'(z)\rvert^2 \bar{z}}{ir}\mathrm{d}z\,\mathrm{d}r.$$ Unfortunately, this approach seems to be a dead end. I think I'm meant to use Cauchy's Formula somewhere, but I can't see where that might be useful in this kind of question. What are the entire functions $f$ such that $|f'(z)| \leq |f(z)| \ ? $ Could someone advise me on how to determine all entire functions $f$ such that $|f'(z)| \leq |f(z)|, \forall z\ ?$  Hints will suffice, thank you. "export PS1=" for customizing shell prompt N circles in the plane Variable name as a string in Javascript