I have the following code:  curtains = 0  def bedroom_curtains_open():     print ("You open your curtains to reveal that it is very dark out.")     print ("It looks to be about 2am, what woke you?")     curtains = 1     bedroom_up()   This, however doesn't change the variable curtains to 1, why is this?
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?
Why didn't Aragorn keep going with the army of the dead? Is there a command that outputs ONLY the packages explicitly installed by the user? (ubuntu/debian) I have tried searching for this but there seems to be no command that can output a list of packages (ideally in Ubuntu) that I have installed, not including any dependencies. I just synced my Mountain Lion Mail app with my Exchange work email account in order to have it locally on my machine (rather than continuously going through the web interface). However, now Mail fetches all the mails since the very beginning (which are a couple of years).  Is there a way (like on iOS devices) to tell Mail to only sync the last month or something configurable amount based on message count, download size or other similar restriction to prevent all messages from being stored locally? Finding probability of other child also being a boy A man visits a couple who have two children.One of them, a boy, comes in to the room. Find the probability p that other is also a boy  a) 1/3 b) 2/3 c) 1/2 d) 3/4  Correct Ans: a) 1/3  However I am getting answer as 1/2.My solution is as follows.  The couple has two children, hence the sample space is as follows.  B- Boy G - Girl  BB BG GG ( BG and GB mean the same thing as Girl,Boy), but it is already known that one is boy.So the sample space reduces to  BB BG  So now p is 1/2  Is there some mistake is my approach ? When updating, I get the following error message:   W: The repository 'http://ppa.launchpad.net/mc3man/trusty-media/ubuntu xenial Release' does not have a Release file.   Here, I find another statement on this error:   This recommends removing certain PPAs; and, I'm not sure if I should do that since it might mean not getting the updates that I need.    Is this what I should do? Why are some applications so hard to find in the Ubuntu Software Centre? Some applications don't pop up in the search even when you type in their name. Take for instance Sushi. When you type in "sushi" into the search box, it fails to throw up the application. Only when you type in "gnome-sushi" does it appear. This is despite the fact that the application has "sushi" by itself in the application description. There are other applications which don't spring to mind right now, but I've discovered before. We know that $\displaystyle\zeta(2)=\sum\limits_{n=1}^{\infty} \frac{1}{n^2} = \frac{\pi^2}{6}$ and it converges.        Does there exists a bijective map $f:\mathbb{N} \to \mathbb{N}$ such that the sum $$\sum\limits_{n=1}^{\infty} \frac{f(n)}{n^2}$$ converges.      If our $s=2$ was not fixed, then can we have a function such that $\displaystyle \zeta(s)=\sum\limits_{n=1}^{\infty} \frac{f(n)}{n^s}$ converges Co-signed a loan and I need to have my name removed Edge won't connect to internet, Skype for business won't screen-share, Windows Store won't update apps after Windows 10 version 1809 installed Why is ++i considered an l-value, but i++ is not? From Windows Vista to 7, can I get rid of folder Windows.old? I've just changed my laptop OS from Windows Vista to Windows 7.  I didn't choose to have both OS together, I just want to have Windows 7.   I was specting Windows 7 instalation program to format/clean my HD and leave me most of its capacity for a fresh start. But I've found, once the OS has been isntalled, that all files and programs from the Vista era are still in my HD, in a folder called Windows.old   I don't need these programs and files, I want to have as much HD space as possible and Windows 7 as clean as possible, what should I do?  Can I just delete Windows.old folder? Would that affect the how Windows 7 works?  Maybe is because I ended up angry with Vista, but I don't like the fact that there wasn't any cleaning/formatting ..   Thanks a lot I would like to add a new cable outlet to an outside wall and wanted to find out what kind of drill bit is needed to drill through and feed the coax cable as well as anything else to be mindful of. Comcast wanted $70 for a new outlet installation ($30 install, $40 tech visit), so I figured I could do it myself. The part that I'm most unfamiliar with is how to properly weather seal it. The outside just has vinyl siding and there's no electrical outlets nearby.  So far, I think I need the following   Coax Cable Coax Cable Wall Plate Long drill bit Add a 3-way Cable Splitter to cable box Weather sealer? Show that $\lim_{n\rightarrow \infty} \sqrt[n]{c_1^n+c_2^n+\ldots+c_m^n} = \max\{c_1,c_2,\ldots,c_m\}$ Let $m\in \mathbb{N}$ and $c_1,c_2,\ldots,c_m \in \mathbb{R}_+$. Show that $$\lim_{n\rightarrow \infty} \sqrt[n]{c_1^n+c_2^n+\ldots+c_m^n} = \max\{c_1,c_2,\ldots,c_m\}$$  My attempt: Since $$\lim_{n\rightarrow \infty} \sqrt[n]{c_1^n+c_2^n+\ldots+c_m^n} \leq \lim_{n\rightarrow \infty}\sqrt[n]{\max\{c_1,c_2,\ldots,c_m\}} = \lim_{n\rightarrow \infty} \sqrt[n]{n}\sqrt[n]{\max\{c_1,c_2,\ldots,c_m\}}=\lim_{n \rightarrow \infty} \max\{\sqrt[n]{c_1^n},\sqrt[n]{c_2^n},\ldots,\sqrt[n]{c_m^n}\}=\lim_{n \rightarrow \infty}\max\{c_1,c_2,\ldots,c_m\}=\max\{c_1,c_2,\ldots,c_m\}$$  it follows that $\lim_{n\rightarrow \infty} \sqrt[n]{c_1^n+c_2^n+\ldots+c_m^n}$ is bounded, but I don't think it's monotonically decreasing, at least I can't prove this. Can anybody tell me whether the approach I have chosen is a good one, whether what I have done is correct and how to finish the proof? Intuitive explanation for formula of maximum length of a pipe moving around a corner? I get weird > symbols in my output — what does it mean? A. $\lim_{n\to\infty}a_nb_n=?$ given that $\lim_{n\to\infty}a_n=0$ and $ \lim_{n\to\infty}b_n=\infty$  B. $\lim_{n\to\infty}{a_n \over b_n}=?$ given that $\lim_{n\to\infty}a_n=0$ and $\lim_{n\to\infty}b_n=0$  C. $\lim_{n\to\infty}{a_n \over b_n}=?$ given that $\lim_{n\to\infty}a_n=\infty$ and $\lim_{n\to\infty}b_n= \infty$    These seem to be difficult situations I come across when I have to evaluate limits.   Some examples,    $\lim_{n\to\infty}n^a\sin(1/n^b)$ with $a,b&gt;1$   $\lim_{n\to\infty}{n^a\over \sin(1/n^b)}$ with $a,b&gt;1$   $\lim_{n\to\infty}{1/n^a\over \sin(1/n^b)}$ with $a,b&gt;1$   $\lim_{n\to\infty} nf(x_n)$ [where we only know that $\lim \ f(x_n) = 0]$    My first question is : Are the two situations  A and B  equivalent ? I feel that they are equivalent as $\lim_{n\to\infty}b_n=\infty \iff \lim_{n\to\infty}{1\over b_n}=0$, The problem is that I'm not sure if we can apply the product rule for limits to take the limit inside.  My second question is : What are some ways to solve such problems ? I only know that we can apply stolz- cesaro in some cases. Pseudoinverse and norm Suppose the m * n matrix A =$ \begin{bmatrix}     A_1 \\A_2 \end{bmatrix}$ where A1 is a nonsingular square matrix (n*n) and A2 is an arbitrary matrix. Why is $||A^{+}||_2 \leq ||A_1^{-1}||_2$  ?   ($A^{+}$ denotes the psuedoinverse) When did the word "so" begin to be used to start a sentence? In the last few years, I've noticed a growing usage of the word "so" to begin a sentence, especially in the context of higher education.  For example:   Interviewer: "What is the nature of your research"  Researcher: "So, what we wanted to find out is..."  It seems to be a replacement the word "well", or, more informally, "ok".  Has this usage of the word been around for a long time and I'm just now noticing it?  Do you think that is a valid use of the word? I have a small issue with configuring the lidR  for parametrizing the extracted raster files with grid_metrics() function.  My question is how to set in the catalog options that:   be able to overwrite the results with a second run if I want to run my script several times and I do not want to name each output differently. instead of .tif I would like to get .grd files as output.   My current code (which is working) is the following:  normalizedctg = catalog(workingdirectory) opt_output_files(normalizedctg) &lt;- paste(workingdirectory,"/clipped/normalized/{XLEFT}_{YBOTTOM}_height",sep="") height = grid_metrics(normalizedctg, max(Z),res = resolution)   But with a second run on the same code I get the following error:  Error in .getGDALtransient(x, filename = filename, options = options,  :    filename exists; use overwrite=TRUE Pixel RGB with ImageMagick and Rails