找bug练习

unlike_movies = [越光宝盒, 逐梦演艺圈]

def check_movie(movie):
  if movie on unlike_movies
    print('🙅️拒绝观看' + movie + '!')
  else:
    print('🙆同意观看' + movie + '!')

check_movie('大话西游')
check_movie('越光宝盒')
check_movie('流浪地球')

改为:

unlike_movies = ['越光宝盒', '逐梦演艺圈']

def check_movie(movie):
  if movie in unlike_movies:
    print('🙅️拒绝观看' + movie + '!')
  else:
    print('🙆同意观看' + movie + '!')

check_movie('大话西游')
check_movie('越光宝盒')
check_movie('流浪地球')

posted @ 2020-07-04 13:01  MINGZHUQI  阅读(152)  评论(0编辑  收藏  举报