#1.1
course="Python Programming"
score=95.5

sentence=f"{course}课程的成绩是{score}分"
print(sentence)
print(type(score))

#1.2
course_under=course.replace(" ","_")
print(course_under)

count_o=course.count('o')
print("字母o出现的次数:",count_o)

words = ["python","ai","machine learning","data","nlp"]
longest=words[0]
for w in words:
  if len(w)>len(longest):
     longest=w
print(f'最长的字符串是"{longest}",长度为{len(longest)}')