migrate to git.charlotte.sh
This commit is contained in:
commit
fbd588721e
412 changed files with 13750 additions and 0 deletions
21
python-csi160/week06/week6practiceproblems/part4.py
Normal file
21
python-csi160/week06/week6practiceproblems/part4.py
Normal file
|
@ -0,0 +1,21 @@
|
|||
def introductions(names):
|
||||
"""Prints introductions.
|
||||
|
||||
An introduction is 'Hello' followed by a space and a name.
|
||||
Include a newline after each introduction.
|
||||
Example:
|
||||
'Hello Josh'
|
||||
|
||||
Important: Your function should use print() and not have a return statement
|
||||
|
||||
:param names: (list) First Names as strings
|
||||
:return: None
|
||||
"""
|
||||
for name in names:
|
||||
print("Hello", name)
|
||||
|
||||
|
||||
# Leave this part for easily testing your function
|
||||
sample_names = input('Enter the names separated by a comma and a space: ').split(', ')
|
||||
introductions(sample_names)
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue