Challenge - 5 Problems
ML vs Traditional Programming Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate2:00remaining
Key difference between ML and traditional programming
Which statement best describes the main difference between machine learning and traditional programming?
Attempts:
2 left
❓ Predict Output
intermediate2:00remaining
Output of a simple ML prediction vs rule-based code
Given the following code snippets, what is the output of the machine learning model prediction compared to the traditional rule-based function?
ML Python
def rule_based(x): if x > 5: return 'High' else: return 'Low' class SimpleModel: def predict(self, x): return 'High' if x > 3 else 'Low' input_value = 4 print(rule_based(input_value)) model = SimpleModel() print(model.predict(input_value))
Attempts:
2 left
❓ Model Choice
advanced2:00remaining
Choosing between ML and traditional programming for a task
You want to build a system that detects spam emails. Which approach is more suitable and why?
Attempts:
2 left
❓ Metrics
advanced2:00remaining
Evaluating ML vs traditional programming accuracy
You test a traditional program and a machine learning model on 100 samples. The traditional program correctly classifies 80 samples, and the ML model correctly classifies 90 samples. What are their accuracies?
Attempts:
2 left
🔧 Debug
expert2:00remaining
Why does this ML model fail but traditional code works?
Given the code below, why does the machine learning model prediction raise an error while the traditional function works fine?
ML Python
def traditional_func(x): return 'Positive' if x > '0' else 'Non-positive' class MLModel: def predict(self, x): return x > 0 input_value = '5' print(traditional_func(input_value)) model = MLModel() print(model.predict(input_value))
Attempts:
2 left