Read first
Task 49
Summarise simply
A summary is choosing the sentences that matter. Splitting on full stops and taking the first two is the simplest version — and it works for notices.
Task
What does a summary keep?
The editor already contains a starting point. Change it until every check passes — the Next task button unlocks when it does.
What you start with
text = 'Admission is open. Classes run Monday to Saturday. Fees are per month. Bring your CNIC copy.'
sentences = [s.strip() for s in text.split('.') if s.strip()]
print(len(sentences), 'sentences')
print('summary:', sentences[0] + '. ' + sentences[1] + '.')
Python
1 automatic check Real work and portfolio
Code editor
Ctrl + Enter runs
Run your code to see the output and the checks.
Your result
Submit your code to see results
Write your code in the middle column and press Run code.
Next task (pass every check first)
Hint
Ask yourself: What does a summary keep?