def game_score(x, y):
if (50.0 <= x <= 70.0) and (30.0 <= y <= 50.0):
score = 10
else:
score = 0
return score
確認用コードは例えば以下の様なものになります。
print('score:', game_score(60, 40)) # score: 10
print('score:', game_score(50, 30)) # score: 10
print('score:', game_score(49, 40)) # score: 0
print('score:', game_score(70, 50)) # score: 10
print('score:', game_score(60, 29)) # score: 0
print('score:', game_score(49, 51)) # score: 0
score: 10
score: 10
score: 0
score: 10
score: 0
score: 0