Open study

is now brainly

With Brainly you can:

  • Get homework help from millions of students and moderators
  • Learn how to solve problems with step-by-step explanations
  • Share your knowledge and earn points by helping other students
  • Learn anywhere, anytime with the Brainly app!

A community for students.

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)
See more answers at
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.

Join Brainly to access

this expert answer


To see the expert answer you'll need to create a free account at Brainly

You can't assign a string as a passive parameter like that. Just make it not a string.
"my_int" = 7 s/b my_int = 7 Other 2, the same.

Not the answer you are looking for?

Search for more explanations.

Ask your own question

Other answers:

@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!
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.
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.
omg @TuringTest NOTHING WILL WORK LMAO Can you go to the '' data types '' mini section to see if it will work? on Academy
is this code academy? I'm not in code academy
here's the proof it works though
Set the name of ALL variables without quotes.
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
...and now everyone is repeating themselves. Click the link that I posted and run the program, you can see it works!
haha yeah I know it works. Python isn't that sensitive I think this is code academy possibly.
Anyone using Code Acadamy that can help me?
It must be, so I guess I'm out since I'm not using Code Academy good luck!
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.
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!
hahaha im sry but just had to comment it....: ppl do not know how to read have been all repeating the same thing that @TuringTest said and that @AcidRaln already said it wont work ....seriously learn to read before posting.....
@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.
@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.

Not the answer you are looking for?

Search for more explanations.

Ask your own question