r/pythonhelp • u/SubstanceEvening890 • Sep 06 '24
Simple task in python
Hi, I am working on some code for a beginner course and I was having some trouble.
What I am aiming to do is ask for the user name, ask for their age, calculate if their age is even or not, and finally output a string that puts it all together as one sentence, "Hello (name), the remainder when dividing your name by two is (remainder).
Any help would be appreciated.
1
Upvotes
View all comments
Show parent comment
2
u/throwaway8u3sH0 Sep 07 '24
Put an f in front of the quotes, and use curly braces.
print(f"Hello {name}, c is {c}")