anonymous
  • anonymous
File "python", line 2 SyntaxError: can't assign to literal Oops, try again. Make sure that you define the variable 'my_int'. #Set the variables to the values listed in the instructions! "my_int" = 7 "my_float" = 1.23 "my_bool" = True Dafaq am I doing wrong? I even tried "my_bool" without "
MIT 6.189 A Gentle Introduction to Programming Using Python (OCW)
  • Stacey Warren - Expert brainly.com
Hey! We 've verified this expert answer for you, click below to unlock the details :)
SOLVED
At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.
jamiebookeater
  • jamiebookeater
I got my questions answered at brainly.com in under 10 minutes. Go to brainly.com now for free help!
TuringTest
  • TuringTest
You can't assign a string as a passive parameter like that. Just make it not a string.
anonymous
  • anonymous
hmm? @TuringTest
anonymous
  • anonymous
"my_int" = 7 s/b my_int = 7 Other 2, the same.

Looking for something else?

Not the answer you are looking for? Search for more explanations.

More answers

anonymous
  • anonymous
@estudier I did that, it wont work.. I have alot of back knowledge on Python and other languages.. I cant seem to figure out why this is not working!
anonymous
  • anonymous
@Dumboy
anonymous
  • anonymous
I have to go but can you try to find out what's wrong. It's section one, can you do me a favor, go back and see what you wrote. I'll check here when I get back.
TuringTest
  • TuringTest
there is no doubt that if you put my_int = 7 my_float = 1.23 my_bool = True #then print it out print my_int, my_float, my_bool you will see that it binds those values to those variables the only thing I can suggest is that you recheck your numbers, otherwise you are missing information, or the test is wrong.
anonymous
  • anonymous
omg @TuringTest NOTHING WILL WORK LMAO Can you go to the '' data types '' mini section to see if it will work? on Academy
TuringTest
  • TuringTest
is this code academy? I'm not in code academy
TuringTest
  • TuringTest
here's the proof it works though http://www.codeskulptor.org/#user2-4bPHjgeQcHUabIT-0.py
anonymous
  • anonymous
Set the name of ALL variables without quotes.
anonymous
  • anonymous
You should make sure that your variables do not have quotes around them, as it is a string. You cannot assign strings values, just like you cannot assign integers and floats values. my_int= 7 my_float= 1.23 my_bool= True
TuringTest
  • TuringTest
...and now everyone is repeating themselves. Click the link that I posted and run the program, you can see it works!
anonymous
  • anonymous
haha yeah I know it works. Python isn't that sensitive I think this is code academy possibly.
anonymous
  • anonymous
@TuringTest
anonymous
  • anonymous
Anyone using Code Acadamy that can help me?
TuringTest
  • TuringTest
It must be, so I guess I'm out since I'm not using Code Academy good luck!
anonymous
  • anonymous
From past experience with Code Academy, be prepared for unexpected responses to unexpected input. This can vary from exercise to exercise, based on randomness introduced in their inline interpreter. If it works in your Python setup but not Code Academy, find a way to move past it.
anonymous
  • anonymous
You made a simple but common mistake: #Set the variables to the values listed in the instructions! "my_int" = 7 "my_float" = 1.23 "my_bool" = True Those quotes " " messed it up. Python thinks its a string! Simple change your code to this, and Monty Python will like you! :) my_int = 7 my_float = 1.23 my_bool = True Good Luck!
MicroBot
  • MicroBot
hahaha im sry but just had to comment it....: ppl do not know how to read rly-.-.....you have been all repeating the same thing that @TuringTest said and that @AcidRaln already said it wont work ....seriously learn to read before posting.....
anonymous
  • anonymous
@Microbot: If it works for everybody else (me too -- I tried) there is possibly something wrong with your setup. Please post OS & Version, Python version, IDLE version.
MicroBot
  • MicroBot
@miker i think u missread what I wrote.what I said is that everyone keep saying its the double quotes...that turing already said.means ppl do not read previous answers.and I just added that acid already even gave him a response on that,by saying it wouldn't work for him.

Looking for something else?

Not the answer you are looking for? Search for more explanations.