Quantcast

Got Homework?

Connect with other students for help. It's a free community.

  • across
    MIT Grad Student
    Online now
  • laura*
    Helped 1,000 students
    Online now
  • Hero
    College Math Guru
    Online now

Here's the question you clicked on:

55 members online
  • 0 replying
  • 0 viewing

AcidRa1n Group Title

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 "

  • 2 years ago
  • 2 years ago

  • This Question is Open
  1. TuringTest Group Title
    Best Response
    You've already chosen the best response.
    Medals 3

    You can't assign a string as a passive parameter like that. Just make it not a string.

    • 2 years ago
  2. AcidRa1n Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    hmm? @TuringTest

    • 2 years ago
  3. estudier Group Title
    Best Response
    You've already chosen the best response.
    Medals 1

    "my_int" = 7 s/b my_int = 7 Other 2, the same.

    • 2 years ago
  4. AcidRa1n Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    @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!

    • 2 years ago
  5. AcidRa1n Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    @Dumboy

    • 2 years ago
  6. AcidRa1n Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    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.

    • 2 years ago
  7. TuringTest Group Title
    Best Response
    You've already chosen the best response.
    Medals 3

    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.

    • 2 years ago
  8. AcidRa1n Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    omg @TuringTest NOTHING WILL WORK LMAO Can you go to the '' data types '' mini section to see if it will work? on Academy

    • 2 years ago
  9. TuringTest Group Title
    Best Response
    You've already chosen the best response.
    Medals 3

    is this code academy? I'm not in code academy

    • 2 years ago
  10. TuringTest Group Title
    Best Response
    You've already chosen the best response.
    Medals 3

    here's the proof it works though http://www.codeskulptor.org/#user2-4bPHjgeQcHUabIT-0.py

    • 2 years ago
  11. dsabalete Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    Set the name of ALL variables without quotes.

    • 2 years ago
  12. LABurn Group Title
    Best Response
    You've already chosen the best response.
    Medals 1

    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

    • 2 years ago
  13. TuringTest Group Title
    Best Response
    You've already chosen the best response.
    Medals 3

    ...and now everyone is repeating themselves. Click the link that I posted and run the program, you can see it works!

    • 2 years ago
  14. AcidRa1n Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    haha yeah I know it works. Python isn't that sensitive I think this is code academy possibly.

    • 2 years ago
  15. AcidRa1n Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    @TuringTest

    • 2 years ago
  16. AcidRa1n Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    Anyone using Code Acadamy that can help me?

    • 2 years ago
  17. TuringTest Group Title
    Best Response
    You've already chosen the best response.
    Medals 3

    It must be, so I guess I'm out since I'm not using Code Academy good luck!

    • 2 years ago
  18. Joet99 Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    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.

    • 2 years ago
  19. waterlubber Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    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!

    • 2 years ago
  20. MicroBot Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    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.....

    • 2 years ago
  21. MikeR Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    @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.

    • 2 years ago
  22. MicroBot Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    @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.

    • 2 years ago
    • Attachments:

See more questions >>>

Your question is ready. Sign up for free to start getting answers.

spraguer (Moderator)
5 → View Detailed Profile

is replying to Can someone tell me what button the professor is hitting...

23

  • Teamwork 19 Teammate
  • Problem Solving 19 Hero
  • You have blocked this person.
  • ✔ You're a fan Checking fan status...

Thanks for being so helpful in mathematics. If you are getting quality help, make sure you spread the word about OpenStudy.

This is the testimonial you wrote.
You haven't written a testimonial for Owlfred.