Python & AI Quiz

12 questions. Score 70% or more to pass this rank's quiz.

1. What does df.groupby('region')['net_sales'].sum() return in pandas?
2. What is the difference between df.loc and df.iloc?
3. By default, which row does df.drop_duplicates() keep when it finds duplicates?
4. What does len([x for x in range(10) if x % 3 == 0]) return?
5. What does df.isna().sum() show?
6. A column contains text like "$12.50". What happens with df['net_sales'].astype(float)?
7. orders.merge(customers, on='customer_id', how='left') keeps...
8. Predicting whether a customer will cancel their loyalty membership (yes/no) is what kind of machine-learning task?
9. A model scores 99% accuracy on training data but 70% on new data. What is the most likely problem?
10. Why do you split data into training and test sets?
11. What does RAG (retrieval-augmented generation) do in an AI assistant?
12. An AI assistant writes a SQL query and a summary of your sales for you. What is the best practice?

More quizzes