给出最简函数代码:本题参考checkioorg读入一个英文句子将此句子的第一个字母改为大写字母并在最后加上句号注意:读入的句子有可能本来就符和要求。函数接口定义:def funsentence裁判测试程序样例: 请在这里填写答案 doc = inputres = fundocprintres输入样例1:在这里给出一组输入。例如:hello world输出样例1:在这里给出相应的输出。例如:Hell
def fun(sentence): if sentence[0].islower(): sentence = sentence[0].upper() + sentence[1:] if sentence[-1] != '.': sentence += '.' return sentence
原文地址: https://www.cveoy.top/t/topic/hngl 著作权归作者所有。请勿转载和采集!