Skip to content
This repository was archived by the owner on Mar 24, 2023. It is now read-only.

ZYHowell/python_interpreter

Repository files navigation

python_interpreter

CS152 standard answer in 2019, TAs' solution This is a naive python interpreter that supports:

1.keywords

None; True; False; return; break; continue; if; elif; else; while; and; or; not; def.

2.#
3.variables

superlong int, double(16), bool, str and part of tuple.

4.assignment and augassignment
5.calculating
1)+, -, *, /, //, %

notice that str + str, str * int and int * str are valid.

2)<, >, <=, >=, ==, !=

a chain of comparisons is avaliable.

3)and, or, not

in this version, the return value is a bool instead of what python returns

4)'()'
6.logical statement

if...elif...elif...else...

7.flow statement

while

8.function definition

positional assignment and default assignment are avaliable print(), int(), float(), str(), bool() are already defined

About

CS152 standard answer in 2019, TAs' solution

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors