Py学习  »  Sumana  »  全部回复
回复总数  2
5 年前
回复了 Sumana 创建的主题 » 编写Python函数来检查字符串是否为pangram
    import string
    alphabet = set(string.ascii_lowercase) 
    def ispangram(str):
         return not set(alphabet) - set(str)
    string = 'the quick brown fox jumps over the lazy dog'
    if(ispangram(string) == True): 
        print("Yes") 
    else: 
        print("No") 
5 年前
回复了 Sumana 创建的主题 » 嵌套For循环乘法表的Python必须具有Teacher的精确输出
    for i in range(1, 13):
        print("*", i, ":", end=" ")
        for j in range(1, 13):
            print("{:2d}".format(i * j), end=" ")
        [![enter image description here][1]][1]print()

enter image description here