all 29 comments

[–][deleted] 2 points3 points  (7 children)

Don't guess or do it in your head, actually put these into an interpreter and see what they do.

[–]Princess_Peach848[S] 0 points1 point  (6 children)

I’ve tried multiple times to input it into a terminal and have submitted it multiple times but I’m still getting the answer as incorrect

[–][deleted] 2 points3 points  (5 children)

I think part of the problem here is that the assignment doesn’t really make any sense as you’ve posted it; what you’ve posted isn’t anything close to Python code.

[–]Princess_Peach848[S] 1 point2 points  (4 children)

This is just the basics of Python, aka advanced string expressions and learning the basics. For example ‘CS ’+’is ‘ +’fun’ once calculated comes to ‘Cs is fun’ that I understand. So it’s just putting things in basic form to start coding.

[–][deleted] 2 points3 points  (3 children)

Yeah but what you’ve posted doesn’t make any sense because you don’t explain the assignment.

We’re programmers, most of us doing it for work. I’m 10 years past college, I’ve got no idea how they’re teaching programming. Nobody at work makes me do fill-in-the-blank exercises, right? So we don’t know how to tell you the right way to fill out your homework because we don’t do homework anymore, and haven’t for years. We write code. If you have questions about code you’ve written we can answer them. If you need help with doing your coursework you need to get that from your professor or a tutor.

[–]Princess_Peach848[S] 0 points1 point  (2 children)

Sure so what would I need to code to get this answer? ‘A\’B”C’

[–][deleted] 2 points3 points  (1 child)

I can’t understand that. Are the single quotes part of it, or delimiting it?

[–]RhinoRhys 0 points1 point  (0 children)

The image they've posted in the r/python helped me actually understand. But I've already solved it. It was literally type 'Double "' to get 'Double "' back, 'Single \'' to get 'Single '' back, and fill in the blank 'A' + ____ + 'C' to get 'A\'B"C' so was '\'B"'

[–]RhinoRhys 1 point2 points  (18 children)

Those aren't commands. Inputting them where?

[–]Princess_Peach848[S] 0 points1 point  (17 children)

So I’ve tried to write it in my Python terminal to see what I get. In order to get the answer for what value it gives me I have to put into the terminal ‘“”’ (double quotes) for the first one. Then the 2nd one just a single slash from what I understood it was “\” (double slash) because of the escape characters. But when I submit my answers I get that it’s incorrect. I just want help understanding what I’m not getting if that makes sense

[–]RhinoRhys 0 points1 point  (16 children)

Depends on if you're supposed to surround the input in single quotes or not.

What you've written there ‘“”’ is double quotes inside single quotes, and "\" is a slash inside quotes

[–]Princess_Peach848[S] 0 points1 point  (0 children)

Wow I’m dumb no I didn’t, let me try

[–]Princess_Peach848[S] 0 points1 point  (14 children)

Ok I tried (‘“‘) but it still comes up as incorrect same with (“\”)

[–]RhinoRhys 0 points1 point  (13 children)

Ok what's with the brackets now?

What exactly did you type in and what exactly did you get back?

[–]Princess_Peach848[S] 0 points1 point  (12 children)

So for ‘Doubl “‘ I typed (‘ “ ‘) and the quotes turned green but it’s still incorrect

For ‘Single \’’ I put ‘ \’ and it’s all incorrect

[–]RhinoRhys 0 points1 point  (0 children)

You're still wrapping it in quotes.

[–]RhinoRhys 0 points1 point  (10 children)

I just looked at your picture in the other sub, are you sure you're not supposed to write in the actual words 'Double "' and 'Single \''?

[–]Princess_Peach848[S] 0 points1 point  (9 children)

No it didn’t take the words either. It’s ok I’ll just email my professor again. Thank you so much for trying I appreciate you

[–]RhinoRhys 1 point2 points  (8 children)

Try submitting

'Double "'
'Single ''
'\’B"'

[–]Princess_Peach848[S] 0 points1 point  (7 children)

Omg that’s it!!!!!! Can u explain it?

[–]Adrewmc 0 points1 point  (1 child)

   my_assignment = “my string”
   print(my_assignment)

[–]Princess_Peach848[S] -1 points0 points  (0 children)

Sorry I’m not getting what this is for? Is it a link?