diff --git a/src/test/data/pa1/student_contributed/bad.py b/src/test/data/pa1/student_contributed/bad.py index b85905e..56f38a7 100644 --- a/src/test/data/pa1/student_contributed/bad.py +++ b/src/test/data/pa1/student_contributed/bad.py @@ -1 +1,31 @@ 1 2 3 + +def fun5(): + c = 6 + def fun6(): + print("Hello") + c = 4 + 5 + +if True: + if True: + print("Hello") + if True: + print("Maybe") + else: + print("World") +else: + print("Again") +else: + print("And Again") + +class Thor(object): + y:int = 0 + print("Right place?") + +class Stones(object): + y:int = 0 + def fun(x:int): + print("Right place?") + def bar(): + return 2+3 + print("Wrong Place") diff --git a/src/test/data/pa1/student_contributed/good.py b/src/test/data/pa1/student_contributed/good.py index 8138b36..6d27ff6 100644 --- a/src/test/data/pa1/student_contributed/good.py +++ b/src/test/data/pa1/student_contributed/good.py @@ -1 +1,68 @@ -1 + 2 + 3 + +print("Hi") +def fun1(): + def fun2(): + print("Hello") + +print("World") + +def fun3(): + def fun4(): + print("Hello") + c = 4 + 5 + +def fun5(): + c = 6 + def fun6(): + print("Hello") + c = 4 + 5 + + +if True: + if True: + if True: + print("Hello") +print("World") + +if True: + if True: + if True: + print("Hello") + print("World") + +if True: + if True: + if True: + print("Hello") + print("World") + +if True: + if True: + if True: + print("Hello") + else: + print("World") + +if True: + if True: + if True: + print("Hello") +else: + print("World") + +class Foo(object): + x:int = 0 + + def __init__(self:"Foo", x:int): + self.x = x + + def bar(y:int)->None: + print("Hello World!",self.x+y) + y = 10 + +f = Foo(1) +print(f.x) +f.bar(4) + +a=[[[1],[2]][[3],[4]]] +print(a[0][0][1]*a[1][1][0]) \ No newline at end of file