Python Basics: Strings and String Methods (Quiz)

Avatar image for ajackson54

ajackson54 on June 29, 2024

I still didn’t get a check mark by my quiz here and in other courses I’ve completed. Do I need to just be patient?

Avatar image for Serghei Dragan

Serghei Dragan on July 21, 2024

@ajackson54, you should be able to get the score instantly unless there was a bug with the platform at the time you were taking the assignment. In my case it worked well.

Avatar image for taniferf

taniferf on Nov. 5, 2024

Once I finished a quiz and didn’t got the evaluation, I just left the browser’s window open, and after 5 min or so I got my mark. Hope we’re not making too much load into RealPython’s server! :)

Avatar image for Lilian Cipciriuc

Lilian Cipciriuc on Dec. 23, 2024

Why it said i had an error whne writing the following string statement?

vulcan_logic = ‘Spok said, “Live long and prosper”’

Avatar image for Martin Breuss

Martin Breuss RP Team on Dec. 23, 2024

@Lilian Cipciriuc where did you get that error? It’s valid Python code:

>>> vulcan_logic = 'Spok said, "Live long and prosper"'
>>> vulcan_logic
'Spok said, "Live long and prosper"'

You may have accidentally used smart quotes in your code? Some programs may automatically substitute those and that’d cause an error in Python:

>>> vulcan_logic = Spok said, Live long and prosper”’
  File "<python-input-0>", line 1
    vulcan_logic = Spok said, Live long and prosper”’
                   ^
SyntaxError: invalid character '‘' (U+2018)

Is that the error you got? If so, make sure to use the plain quotation marks when writing Python strings.

Become a Member to join the conversation.