Module 2 Programming Assignment - Exercise 2&3 - Grader for Print Statement

This is about AP4B Module 2 Programming Assignment - Exercise 2&3 - Grader for Print Statement

In Exercise 2, I got 2 points deducted with following grader output:
“Failed test case: Detected incorrect number of valid print statements (without f-strings). Expected: 2, but got: 0.” However, in my submission, I did do the print function without the f-strings.
In Exercise 3, I got 2 points deducted with following grader output: “Failed test case: Detected incorrect number of valid print statements (with f-strings). Expected: 1, but got: 0.” However, in my submission, I did do the print function with the f-strings.

Is there something wrong about my code, or is there any error on the test case code?

Thank you!

hi @tl122008

you were suppose to use f-string while using the print recall.

Say I was told to print a book title by Nature Sings

the print statement would be

print(f"{Book Title} : {Nature Sings}")

Notice the f"{}" this is missing in your print statement according to the error output given.

Regards
DP

Hi @Deepti_Prasad,

Thank you for the response. I did use the f-string in the print function in Exercise 3, but somehow the test code could not detect it.

I did not use f-string in the print function in Exercise 2, because the instruction specifically told me not to Because of this, use regular strings and NOT f-strings. Somehow the test code could not detect that I did not use f-string as well.

Thank you.

can you send me screenshot of the codes you wrote by personal DM. don’t post codes here

Sure - I just did. Thank you!

Hi @tl122008,

Are your issues resolved or are you still facing them?

Best,
Mubsi

Hi @Mubsi and @Deepti_Prasad ,
Please consider this closed as I completed my course :slight_smile:
Thanks!

2 Likes