题解 | 牛牛的字符菱形

牛牛的字符菱形

https://www.nowcoder.com/practice/11a5040fa894430f9d25fda1be37ddc8

ch = input()
for i in range(1,6):
    if  i == 1:
        print("  ", ch, "  ", sep='')
    elif i == 2:
        print(" ", ch, ch, ch, " ", sep='')
    elif i == 3:
        print(ch, ch, ch, ch, ch, sep='')
    elif i == 4:
        print(" ", ch, ch, ch, " ", sep='')
    else:
        print("  ", ch, "  ", sep='')

全部评论

相关推荐

评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务