向远远


私信TA

用户名:FayeWong

访问量:824

签 名:

等  级
排  名 21871
经  验 626
参赛次数 0
文章发表 5
年  龄 0
在职情况 学生
学  校
专  业

  自我简介:

解题思路:

注意事项:

参考代码:

def statistics_type(s_string):
   num_alphbets = 0
   num_num = 0
   num_space = 0
   num_others = 0
   for item in s_string:
       if item.isalpha():
           num_alphbets += 1
       elif item.isdigit():
           num_num += 1
       elif item.isspace():
           num_space += 1
       else:
           num_others += 1
   return num_alphbets, num_num, num_space, num_others


def main():
   result = statistics_type(input())
   for item in result:
       print(item, end=' ')


main()

 

0.0分

2 人评分

看不懂代码?想转换其他语言的代码? 或者想问其他问题? 试试问问AI编程助手,随时响应你的问题:

编程语言转换

万能编程问答  

代码解释器

代码纠错

SQL生成与解释

  评论区

真服了,发个题解跟你发出来优越感了是吧做的跟很难的是的服了
2022-05-22 18:47:46
  • «
  • 1
  • »