So, I was making a text-based "shopping" program, and I came across an error that didn't quite make sense to me. The error message was this:  TypeError: can't multiply sequence by non-int of type str   Here is a code snippet of where I think the error is located (Comment above line where I believe error to be located):  def buy():     print "\nType in a store item to buy."     find_item = raw_input(prompt)     if find_item in store_items:         print "Amount?"         amount = raw_input(prompt)         if amount:                         #Error in next line?             store_rec.append(store_items[find_item] * amount)             get_buy()   If you're wondering, store_items is a dictionary containing the store items like this:  store_items = {     "carrot": "carrot",     "apple": "apple",     "pear": "pear",     "taco": "taco",     "banana": "banana",     "tomato": "tomato",     "cranberry": "cranberry",     "orange": "orange", }   Then store_rec is an empty list, like this:  store_rec = []   It contains recommendations for telling the user what to buy next time, but that's not where I think the error is located. What I was trying to do in the line where the error appears to be, is append the amount of items specified by the user to the empty store_rec list. Unfortunatly, then I get the error. It seems like it should work, but it doesn't. So, with that in mind, any help on my problem is appreciated!
I am typing to get a sale amount (by input) to be multiplied by a defined sales tax (0.08) and then have it print the total amount (sales tax times sale amount).  I run into this error. Anyone know what could be wrong or have any suggestions?   salesAmount = raw_input (["Insert sale amount here \n"]) ['Insert sale amount here \n']20.99 &gt;&gt;&gt; salesTax = 0.08 &gt;&gt;&gt; totalAmount = salesAmount * salesTax  Traceback (most recent call last):   File "&lt;pyshell#57&gt;", line 1, in &lt;module&gt;     totalAmount = salesAmount * salesTax TypeError: can't multiply sequence by non-int of type 'float'
How can I convert monsters from D&D 3 or 3.5 to 2ed monsters? Access nested dictionary items via a list of keys? Possible Duplicate:          I have been downvoted for few answers of mine and the person who downvoted me did not leave any comments or reasons to say why I was downvoted. In such cases, how can I find out who has downvoted me and the reason for downvoting? The Problem  Currently if I flag a post, I cannot check the status of the flag unless I have prior helpful flags. This means, for example, that a new user who wants to check the status of his first flag cannot do so while it is pending (active).  This feature request is based on my experience on MSO, where I wanted to check the status of my flag but could not get to the summary page without cheating (tweaking my SO link to work with MSO). It also stems from this question, where the OP indicates he had the same issue:   My Proposal  If I have flagged any post, then show me a "flags" link (red arrow in image below). If I have any helpful flags, then the number of helpful flags should be displayed (blue arrow). If I have not flagged anything, then neither should be displayed (as with current site functionality). I don't really get why these hyperbolic functions are named after trig functions. Can someone enlighten me? What if my State / Country doesn't have a Ubuntu LoCo Team? How can I start one? I know what an Ubuntu Team is and , but what can users do if their area doesn't have a LoCo team? I was browsing PhD position offers in Europe on different websites and I was quite surprised to find that several offers contained sentences such as     University of X value equality and diversity. We strongly encourage women and BAME applicants for this position.    where BAME stands for Black, Asian and Minority Ethnicities; or     The research group aims to increase the number of women in scientific positions. Female candidates are therefore encouraged to apply.   Is it considered normal in the academic environment to discriminate between  candidates according to their race and/or gender for "egalitarian" reasons?   How is the choice of a candidate based on their gender and/or race considered "egalitarian"? Measure of Image of Linear Map I am trying to work my way through the proof of the change of variables theorem for Lebesgue integrals. A key lemma in this context is as follows:  If $T:\mathbb{R}^n \rightarrow \mathbb{R}^n$ is a linear map and $A \subset \mathbb{R}^n$ is Lebesgue measurable then $\lambda(T(A)) = |\det T \  | \cdot \lambda (A)$, where $\lambda(X)$ denotes the Lebesgue measure of $X$.  Can anyone provide a reference for a proof of this lemma that clearly references the facts from linear algebra that are necessary to effect the proof? The source I have for this lemma refers to German texts that I am incapable of reading and I have been unsuccessful at finding an alternate proof.  Added For the Benefit of Future Readers: In addition to the excellent references I received in response to this question, I have managed to find an additional reference that also provides a good proof of this fact: Aliprantis and Burkinshaw's Principles of Real Analysis, Third Edition, Lemma 40.4 pp 389-390. I am using Blender to mix the video from my camera with the audio from my external recording setup.  It works great mostly and I am very pleased with it.  But the problem is that I can't start the audio recorder an even number of thirtieths of a second from when I started the camera.  And Blender seems to only let me move the audio track in the VSE by whole frames (1/30 of a second).  Here are a couple screenshots:   The track on top is the external audio and the one on the bottom is the camera's audio.  Between the two screenshots I have only moved the audio track by one frame.  But as you can see, I need to move it by about 1/2 frame to line up the audio properly with the video.  So can I move a track in the VSE by fractions of a frame? My cursor is moving by every selection by large increments!  Normally when I use Blender, I am able to select and move objects to any coordinate. Now, all of the sudden, when I select an object or mesh the selection moves by an inch or so in each direction.  How do I reset it to normal? An analytic function $f$ on $\{z \in\mathbb{C} : |z|>1 \}$ File sync error (AUTH_FAILED) Recently I started getting a File sync error on all 3 of my PCs running Ubuntu One.  One is running Ubuntu, the other 2 are running Windows 8.  Looking at the list of clients on the web, none of them were there anymore.    I found this article:      On how to fix the issue for my Ubuntu PC and it worked perfectly.  Now I am looking for a similar fix for Windows but haven't found one yet.  I've tried un-installing Ubuntu One and re-installing it, but it must still be holding the keys somewhere because it never asked me to login again.    Does anyone know where I can clear these keys to get my files syncing on Windows again? Find the domain of composition of two functions Let $$f(x)= \frac{x}{x-9} \text{ and } g(x) = \frac{-6}{x+5} $$   Find the domain of $f \circ g.$    Please show the steps and substitution/algebra to the problem. Thank you. Old Sci-Fi book with skin crystalizing disease and characters with psi powers Convert NSDate to NSString Can a wealthy investor invest in or make a deal with a company before it goes public / IPO? Can a wealthy investor invest his money in any company before it goes public / IPO? I am referring to a recent Goldman Sachs and Facebook deal worth $450 Million at a valuation of $50 Billion dollars.   I want to know what is the procedure and how are these valuations made prior to the company going public? Is is possible that an investor could raise capital from investment banks, private equity, or commercial banks to re-invest in a pre-IPO deal at some valuation?  Knowing that angel investors don't provide so much money, can they play their role here with a normal investor? How to install import_3dm add-on properly? I just started blender and one of the main things you have to do is to render to make an animation, but I can't seem to do that. Whenever I click Render and then render image or render animation, at the top of the screen it says 'No camera found in Scene "Scene". I don't know why this is happening. How to install with Wubi when it says "Could not retrieve the required disk image files"? How to create a new partition from the existing partition? I wanna create a new partition from the existing root partition.My root partition is about 250GB.I wanna create a new partition say 150 GB taking space from this root partition.Can anyone help me with the procedure on doing this?  output: fdisk -l  karthick@karthick:~$ sudo fdisk -l [sudo] password for karthick:   Disk /dev/sda: 250.0 GB, 250000000000 bytes 255 heads, 63 sectors/track, 30394 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x28219744  Device Boot      Start         End      Blocks   Id  System /dev/sda1   *           1          61      487424   83  Linux Partition 1 does not end on cylinder boundary. /dev/sda2              61       30395   243650561    5  Extended /dev/sda5              61         124      498688   82  Linux swap / Solaris /dev/sda6             124         186      498688   82  Linux swap / Solaris /dev/sda7             186       30395   242651136   83  Linux