import pandas as pd
def select_rows(df):
return df[(df['attempts'] < 2) & (df['score'] > 15)]
df1 = pd.DataFrame({'name': ['Tom', 'Jack', 'Steve', 'Ricky'], 'score': [18, 19, 20, 21], 'attempts': [1, 2, 1, 2]})
df2 = pd.DataFrame({'name': ['Adam', 'Eve', 'Stark', 'Rogers'], 'score': [16, 15, 16, 17], 'attempts': [1, 1, 2, 2]})
print(select_rows(df1))
print(select_rows(df2))