I've had this problem for a while, where some of my values will just refuse to store. It's most likely because of a rule which I am breaking somewhere, but after searching the Internet for quite some time and I can't find the problem.  Code:  #TO SET#  def min_count_set():   stancount = int(input("How many standard miners do you wish to start with? "))   if (stancount &gt; 10000 or stancount &lt; 0):     print("\n Please enter a valid number to start with. \n \n")     min_count_set()   else:     advcount= int(input("How many advanced miners do you wish to start with? "))   if (advcount &gt; 10000 or advcount &lt; 0):     print("\n Please enter a valid number to start with. \n \n")     min_count_set()   else:     ultrcount = int(input("How many ultra miners do you wish to start with? "))   if (ultrcount &gt; 10000 or ultrcount &lt; 0):     print("\n Please enter a valid number to start with. \n \n")     min_count_set()   else:     print("\n Returning you to the setup menu \n \n")   set_mining_values()  #TO PRINT# def view_mining_values():   print("\n Printing all of the variables now.")   print("\n Number of standard miners starting with: ")   print(stancount)   print("\n Number of advanced miners starting with: ")   print(advcount)   print("\n Number of ultra miners starting with: ")   print(ultrcount)   The error I receive is:  NameError: name 'stancount' is not defined   I previously tried giving the variable stancount a number and then run it through the input, but then it would just relay the number I gave it before the input.
How can I create or use a global variable in a function?  If I create a global variable in one function, how can I use that global variable in another function? Do I need to store the global variable in a local variable of the function which needs its access?
Is it safe to use the command apt-get autoremove in this particular scenario? In Einstein's General Relativity, do the space-time dimensions curve according to the positions of stars, planets, and masses? How to draw arrows between circled coefficients of polynomials using tikz A lot of my scripts stopped working after installing Ubuntu 15.10 and I have trouble remembering this new name as I was used to ethx and wlanx for years. Is there a reason for this change? Do I have to get used to this or can I just rename it and go back to good old eth0?  $ ifconfig  enp0s25   Link encap:Ethernet  HWaddr 77:5a:5e:a6:86:d5         inet addr:192.168.31.239  Bcast:192.168.31.255  Mask:255.255.255.0       inet6 addr: fe80::725a:b6ff:fea6:86d7/64 Scope:Link       UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1       RX packets:4833 errors:1332 dropped:0 overruns:0 frame:666       TX packets:5589 errors:0 dropped:0 overruns:0 carrier:0       collisions:0 txqueuelen:1000        RX bytes:3266446 (3.2 MB)  TX bytes:1046654 (1.0 MB)       Interrupt:20 Memory:d3500000-d3520000 Is it possible to "hack" a MacBook so as to be able to install macOS Mojave? Finding the fallacy in this broken proof Today, a friend gave me a "proof" of $1=2$ and challenged me to find the fallacy.     $1 = 1$      $1 = 1 + 0 + 0 + 0 ...$      $1 = 1 + 1 - 1 + 1 - 1 + 1 - 1 ...$      $1 = 2 - 1 + 1 - 1 + 1 - 1 ...$      $1 = 2 + 0 + 0 ...$      $1 = 2$   My answer was that once you turn the initial $1 + 1$ into a 2, everything is offset so a $-1$ is always left at the end no matter how many times it is repeated. This negative one balances out the $2$ at the beginning so $1=1$ still holds true. I.e.  $$1 = 1 + 0 + 0 + 0 ... = 1 + (1 - 1) + (1 - 1) + (1 - 1) = 2 + (-1 + 1) + (-1 + 1) - 1$$  However, my friend claimed that my answer only applies if the $+ 1 - 1$ repeats for a finite number of times. He argues that because the sequence repeats infinitely and things work differently when working with infinity, my answer is not valid.  Can anyone enlighten me to the true fallacy in this proof? Let $(a,b)$ and $(c,d)$ be intervals in $\Bbb R$, and find an injective and surjective function from $(a,b)$ to $(c,d)$ So here is this question I got stuck on:  Let $(a,b)$, $(c,d)$ be intervals (not sure if that's the correct term) on $\Bbb R$, so that $a&lt;b$, $c&lt;d$. Find an injective and surjective function $f:(a,b)\rightarrow(c,d)$.   Thanks in advance!   P.S. I get these question a lot. Is that some way of thinking, or some general method I should follow to make these question easier for me to solve? Remove blank attributes from an Object in Javascript Power Off button is gone on Ubuntu 20.04 LTS I recently installed Ubuntu 20.04 LTS on my laptop and I noticed that I no longer have the Power Off button but rather a menu that I need to click on and then I need to click on Power Off... and then Power Off. Is there a way to get the button back? Showing that $|N \cap Z(G)| > 1$ for normal subgroups of p-groups Find $\lim \limits_{n \to \infty}{1*4*7*\dots(3n+1) \over 2*5*8* \dots (3n+2)}$ I am trying to find  $$\lim \limits_{n \to \infty}{1*4*7*\dots(3n+1) \over 2*5*8* \dots (3n+2)}$$  My first guess is to look at the reciprocal and isolate factors:  $${2 \over 1}{5 \over 4}{8 \over 7} \dots {3n+2 \over 3n+1}= {\left(1+1\right)}\left(1+{1 \over 4}\right)\left(1+{1 \over 7}\right) \dots \left(1+{1 \over 3n+1}\right)$$ Now we take the natural log: $$\ln{ + \ln\left(1+1\right)} + \ln\left(1+{1 \over 4}\right) +\ln\left(1+{1 \over 7}\right) \dots +\ln\left(1+{1 \over 3n+1}\right)$$ Using $\ln(1+x) \le x$, we get: $$\ln{ + \ln\left(1+1\right)} + \ln\left(1+{1 \over 4}\right) +\ln\left(1+{1 \over 7}\right) \dots +\ln\left(1+{1 \over 3n+1}\right) \le 1 + {1 \over 4} + {1 \over 7} + \dots + {1 \over 3n+1}$$ Now, I'm stuck. I suppose I might use the fact that the RHS is similar to the harmonic series and show that it converges to some log, but I'm not sure how to do that. Do you have any clues? Why does my shell script choke on whitespace or other special characters? Or, an introductory guide to robust filename handling and other string passing in shell scripts.  I wrote a shell script which works well most of the time. But it chokes on some inputs (e.g. on some file names).  I encountered a problem such as the following:   I have a file name containing a space hello world, and it was treated as two separate files hello and world. I have an input line with two consecutive spaces and they shrank to one in the input. Leading and trailing whitespace disappears from input lines. Sometimes, when the input contains one of the characters \[*?, they are replaced by some text which is is actually the name of files. There is an apostrophe ' (or a double quote ") in the input and things got weird after that point. There is a backslash in the input (or: I am using Cygwin and some of my file names have Windows-style \ separators).   What is going on and how do I fix it? Minimum eigenvalue and singular value of a square matrix How to show that the relationship $\left | \lambda_{min} \right | \geq \sigma_{min}$ holds between the minimum eigenvalue and singular value of a square matrix $A \in \mathbb{C}^{n \times n}$? Extending the User model with custom fields in Django Is it ever bad to use \left and \right? For mathematics, is it ever disadvantageous to use \left(  and \right)  in equations?  I can't see any way that doing this would hinder the typesetting, so why isn't () just converted into \left( \right) automatically? This would save a lot of typing.  Cheers! Show by induction: $(1+\frac{1}{n})^{n}<n$ Show by induction that for all natural numbers n>3  $(1+\frac{1}{n})^n&lt;n$  Let $(1+\frac{1}{n})^n&lt;n$ be true !   We show that $(1+\frac{1}{n+1})^{n+1})&lt;n+1$  $(1+\frac{1}{n})^n(1+\frac{1}{n})&lt;n(1+\frac{1}{n})$   $(1+\frac{1}{n})^{n+1}&lt;n+1$  So now we just need to show that   $(1+\frac{1}{n+1})^{n+1}&lt;(1+\frac{1}{n})^{n+1}$  So here , If I show that :   $(1+\frac{1}{n+1})&lt;(1+\frac{1}{n})$   Does that mean im done with exercise ? How do berry mutations work? Error message in my excel formula Why do people buy stocks that pay no dividend? Should words be capitalized for being religious terms? While googling about whether "atheist" should be capitalized, and skimming past posts by people blogging about atheism rather than about English grammar, I came across    It says     [Capitalize] Religions and religious terms       Examples:      Catholicism, Hinduism, Buddha, the Bible, Christian, the Ten   Commandments, Baptist church, Mt. Zion Methodist Church      NOTE: Do not capitalize the following:       Examples:      church, communion, atheist, agnostic, spirituality   but I don't recall hearing of such a prescription before. Wouldn't most of the examples listed be capitalized because they're proper nouns? Are there good examples of words being capitalized solely because they're religious terms?  I'm mainly interested in modern English, rather than days of past where a lot more words were capitalized than they are nowadays.  Somewhat related:  - use "God" when referring to the name of the god of Judaism and Christianity (a proper noun), but "god" when referring to the general concept of a deity (common noun).