You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm a complete beginner with no prior programming experience. While trying to learn Python using the webpage you created, I got stuck on the previous question. I repeatedly adjusted the spacing in the print statement and even used AI tools, but I still couldn't pass the test. Even after clicking "View Answer," I couldn't figure out what the issue was. I'm not sure what's going on, so I'm reaching out for help.
这是我打出的代码:
class Person:
def init(self, name, age):
self.name = name
self.age = age
Beyond the return vs. print distinction mentioned by @heeklb6, automated testing platforms often strictly enforce exact string formatting. Please verify if the problem requires a specific f-string format or if there is a hidden requirement to include a period at the end of the sentence. If the test still fails after changing to a return statement, copy the exact error message or the expected output string provided by the test suite so I can see if there is a subtle whitespace or punctuation mismatch.
Activity
rorieaniston26 commentedon Sep 20, 2026
Beyond the return vs. print distinction mentioned by @heeklb6, automated testing platforms often strictly enforce exact string formatting. Please verify if the problem requires a specific f-string format or if there is a hidden requirement to include a period at the end of the sentence. If the test still fails after changing to a return statement, copy the exact error message or the expected output string provided by the test suite so I can see if there is a subtle whitespace or punctuation mismatch.