Day 008 - Project 8 : Affirmations (or insults) Generator

If you have any questions, comments or issues with this project please post them here!

2 posts were split to a new topic: Type error when printing a string and variable

Hello, I am working on day 8 and below is the start of my code:

print('Hello, welcome to this page')
name = input('Name? ')
print('Hello', name)

It keeps returning the following error:

Traceback (most recent call last):
  File "", line 3, in <module>
TypeError: 'str' object is not callable

I tried changing name to to name1,name2,etc… and I am still facing the same issue. Can anyone help?

Hey @Tmanlearns welcome to the forums.

It’s because you need to use the same kind of quotes. Both need to be " or ' and can’t be mixed and matched

Thank you for pointing that out! I fixed it and I am still facing the same issue, do you have any idea on what could be wrong?

Hi @Tmanlearns can you please post a link to your Repl so the community can see the error message and suggest some ideas?

Thank you @IanAtReplit @Ethan . I solved the issue by deleting the work file(that is and creating a new one. Is there a way to mark this as solved?

1 Like

That’s ok @Tmanlearns this is a thread for any issues with Day 8. No need to mark as solved.

please help me with this.
I am new to the coding business and i need some help

Hey @himateja_yarlagadda welcome to the forums.

The problem is that you did not end the string or the print statement. To do this add ") at the end of the line.

1 Like

I got stuck in the challenge 8. I wrote all my statement and my condition. It doesn’t go inside of the statement.
Can you help me?

Hi @Bea2022 thanks for your question.

I think the issue might be with the following section of code:

if day == "monday":
    print(biginning+start + monday+close)
elif day == "tuesday":
    print(biginning+start + tuesday+close)
elif day == "wenesday":
    print(biginning+start + wenesday+close)
elif day == "thurday":
    print(biginning+start + thurday+close)
elif day == "friday":
    print(biginning+start + friday+close)
elif day == "saturday":
    print(biginning+start + saturday+close)
elif day == "sunday":
    print(biginning+start + sunday+close)
    "what day is today!\nYou need to introduce the wright name of the day"

The day you type in must be EXACTLY the same as the options in the if…elif…else section of code, wednesday and thursday have a slight typo in the code shown above.

You also need to add a print to the last line of code, e.g.

print( "what day is today!\nYou need to introduce the wright name of the day")

Hope this helps!

1 Like

Good shout, with the spelling and the missing print.

Thank you for being here!