fork download
  1. course = "Python Programming"
  2. score = 95.5
  3. sentence = f"{course}课程的成绩是{score}分"
  4.  
  5.  
  6. course_under = course.replace(" ","_")
  7. print(course_under)
  8. count_o = course.count('o')
  9. print("字母o出现的次数:",count_o)
Success #stdin #stdout 0.08s 14184KB
stdin
Standard input is empty
stdout
Python_Programming
字母o出现的次数: 2