Skip to content

Commit 114e17d

Browse files
committed
Merge branch '2024/spring' into 2024/x
2 parents 16ae0c6 + dba5507 commit 114e17d

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

hello/__init__.py

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import check50
2+
import check50.c
3+
4+
5+
@check50.check()
6+
def exists():
7+
"""hello.c exists"""
8+
check50.exists("hello.c")
9+
10+
11+
@check50.check(exists)
12+
def compiles():
13+
"""hello.c compiles"""
14+
check50.c.compile("hello.c", lcs50=True)
15+
16+
17+
@check50.check(compiles)
18+
def emma():
19+
"""responds to name Emma"""
20+
check50.run("./hello").stdin("Emma").stdout("Emma").exit()
21+
22+
23+
@check50.check(compiles)
24+
def rodrigo():
25+
"""responds to name Rodrigo"""
26+
check50.run("./hello").stdin("Rodrigo").stdout("Rodrigo").exit()

0 commit comments

Comments
 (0)