知了傳課Python測試與開發(fā)高薪特訓(xùn)
2023-06-27 14:48 作者:bili_42401237447 | 我要投稿
names.py
from name_function import get_formatted_nameprint("Enter 'q' at any time to quit.")while True:
? ?first = input("\nPlease give me a first name: ")
? ?if first == 'q':
? ? ? ?break
? ?last = input("Please give me a last name: ")
? ?if last == 'q':
? ? ? ?break
? ?formatted_name = get_formatted_name(first, last)
? ?print("\tNeatly formatted name: " + formatted_name + '.')
標(biāo)簽: