You answeredJUST NOW
Python
STDIN
Input:Make eazy ca$h now!
Output:SPAM
Input:Hi, Don. Just wanted to confirm we're on for lunch on Wednesday?
Output:NOT SPAM
-
Output:SPAM
Input:Hi, Don. Just wanted to confirm we're on for lunch on Wednesday?
Output:NOT SPAM
-
Expected STDOUT
{'input': 'Make eazy ca$h now!', 'output': 'SPAM'}
{'input': "Hi, Don. Just wanted to confirm we're on for lunch on Wednesday?", 'output': 'NOT SPAM'}
{'input': "Hi, Don. Just wanted to confirm we're on for lunch on Wednesday?", 'output': 'NOT SPAM'}
Your STDOUT
{'input': 'Make eazy ca$h now!', 'output': 'SPAM'}
{'input': "Hi, Don. Just wanted to confirm we're on for lunch on Wednesday?", 'output': 'NOT SPAM'}
{'input': "Hi, Don. Just wanted to confirm we're on for lunch on Wednesday?", 'output': 'NOT SPAM'}
STDIN
Input:I liked it
Output:+
sfadf
fs
Input:I hated it
Output:-
Input:It was quite nice
Output:+
Input:A truly amazing film
Output:+
Input:I would not recommend it
Output:-
-
Expected STDOUT
{'input': 'I liked it', 'output': '+'}
{'input': 'I hated it', 'output': '-'}
{'input': 'It was quite nice', 'output': '+'}
{'input': 'A truly amazing film', 'output': '+'}
{'input': 'I would not recommend it', 'output': '-'}
{'input': 'I hated it', 'output': '-'}
{'input': 'It was quite nice', 'output': '+'}
{'input': 'A truly amazing film', 'output': '+'}
{'input': 'I would not recommend it', 'output': '-'}
Your STDOUT
{'input': 'I liked it', 'output': '+'}
{'input': 'I hated it', 'output': '-'}
{'input': 'It was quite nice', 'output': '+'}
{'input': 'A truly amazing film', 'output': '+'}
{'input': 'I would not recommend it', 'output': '-'}
{'input': 'I hated it', 'output': '-'}
{'input': 'It was quite nice', 'output': '+'}
{'input': 'A truly amazing film', 'output': '+'}
{'input': 'I would not recommend it', 'output': '-'}
STDIN
Input:What day is it?
Output:question
Input: It is Thursday.
Output:statement
Input:When is the big game?
Output:question
Input:Can you get that for me?
Output:question
Input:I really enjoyed the movie.
Output:statement
-
Output:question
Input: It is Thursday.
Output:statement
Input:When is the big game?
Output:question
Input:Can you get that for me?
Output:question
Input:I really enjoyed the movie.
Output:statement
-
Expected STDOUT
{'input': 'What day is it?', 'output': 'question'}
{'input': 'It is Thursday.', 'output': 'statement'}
{'input': 'When is the big game?', 'output': 'question'}
{'input': 'Can you get that for me?', 'output': 'question'}
{'input': 'I really enjoyed the movie.', 'output': 'statement'}
{'input': 'It is Thursday.', 'output': 'statement'}
{'input': 'When is the big game?', 'output': 'question'}
{'input': 'Can you get that for me?', 'output': 'question'}
{'input': 'I really enjoyed the movie.', 'output': 'statement'}
Your STDOUT
{'input': 'What day is it?', 'output': 'question'}
{'input': 'It is Thursday.', 'output': 'statement'}
{'input': 'When is the big game?', 'output': 'question'}
{'input': 'Can you get that for me?', 'output': 'question'}
{'input': 'I really enjoyed the movie.', 'output': 'statement'}
{'input': 'It is Thursday.', 'output': 'statement'}
{'input': 'When is the big game?', 'output': 'question'}
{'input': 'Can you get that for me?', 'output': 'question'}
{'input': 'I really enjoyed the movie.', 'output': 'statement'}
Instructor solution
Object-Oriented Programming (OOP) in Python presentation (pages 14, 15)
By Alec Kretch (Apr 2, 2021)
You may exit out of this review and return later without penalty.