You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: curriculum/challenges/english/blocks/workshop-email-simulator/685cdfd1932d8ac6ad986813.md
+26-5Lines changed: 26 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,29 +15,50 @@ Here is an example:
15
15
16
16
```py
17
17
x =10
18
-
y ='Even'if x %2==0else'Odd'# y will be even
18
+
y ='Even'if x %2==0else'Odd'# y will be Even
19
19
```
20
20
21
21
Within the method, before, use conditional expression to assign the string `Read` to a variable `status` if the email is read and `Unread` if it is not.
22
22
23
23
# --hints--
24
24
25
-
The `__str__` method should create a `status` variable that uses a conditional expression.
25
+
You should have a `status` variable within the `__str__` method.
26
26
27
27
```js
28
28
({
29
29
test: () => {
30
-
assert(runPython(`_Node(_code).find_class("Email").find_function("__str__").has_stmt("status = 'Read' if self.read else 'Unread'")`));
0 commit comments