fork download
  1. #1.1
  2. course="Python Pronraming"
  3. score=95.5
  4.  
  5. sentence=f"{course}课程的成{score}分"
  6. print(sentence)
  7. print(type(score))
  8.  
  9. #1.2
  10. course_under=course.replace(" ","_")
  11. print(course_under)
  12.  
  13. count_o=course.count('o')
  14. print("字母o出现的次数:",count_o)
  15.  
Success #stdin #stdout 0.09s 14100KB
stdin
print
stdout
Python Pronraming课程的成95.5分
<class 'float'>
Python_Pronraming
字母o出现的次数: 2