[Tutor] Python programming question related to Return/Print statement
dn
PyTutor at DancesWithMice.info
Fri Aug 14 19:42:50 EDT 2020
On 15/08/2020 05:45, eric grunfeld wrote:
> Good Afternoon Everyone:
>
> I have been seeking to rectify my mistake in running this program via
> Python.
>
> Here it is:
>
> def format_name(first_name, last_name):
> return "Name " + first_name + ", " + last_name
> return string
There's a cultural divide here. Even in different English-cultures:
given-name, fore-name, surname, family-name, etc. (multiply-rapidly when
adding other languages and their cultures!)
Given your own (email) name, are you familiar with the question's terms:
first-name and last-name?
> print(format_name("Ernest", "Hemingway"))
> # Should return the string "Name: Hemingway, Ernest"
Whilst this (is the only thing we can see that) gives a clue, none of
the other sample data (reproduced) will help such understanding.
> I look forward to your thoughts or comments that you may have on this
> matter.
It might help (us, to help you) to include (the core of) the
course-assignment with a question. Looking at the sample data, the
specification *must* (surely) include mention of more than the label,
the colon, the two names, and the comma-separator!
BTW there is no crime/embarrassment in mentioning that it is a
course-assignment. We're happy to help introduce you/others to Python,
and the more information you give us, the better we can help your
learning-progress!
--
Regards =dn
More information about the Tutor
mailing list