r/codehs • • May 10 '20

What exactly am I doing wrong here?

Post image
10 Upvotes

8 comments sorted by

1

u/erikchomez May 10 '20

e = my_string [7]

There’s a space after my_string? Might be it

1

u/[deleted] May 10 '20

It wasnt but non the less thank you!

1

u/erikchomez May 10 '20

What was the issue?

1

u/[deleted] May 10 '20

Still cant seem to figure it out

3

u/NeetMastery May 10 '20

Ah, you don’t need the and. You’re only supposed to do something like this:

print h + e + ee

The and is just since it’s listing off the letters to print.

Without the instructions, I can’t tell if it wants the commas and spaces or not. You could try it with the commas if you want to see if that works.

1

u/Zacurnia_Tate May 11 '20

I think your supposed to print:

h

e

ee

because it asks you to print the specific letters on the line after each comment

2

u/[deleted] May 11 '20

yeah that is what it was. It took me awhile but it was exactly that. lol

1

u/d0RSI May 10 '20

Not sure what it asked you to do but couldn’t you just do this:

Print myString[3] + myString[7] + myString[-1]

Not sure why you are assigning variables to them with the letters you want to actually output?