TEPL
v2.0.0
TEPL是一種簡單的教育編程語言,旨在初學者學習基本的編程概念。它提供了一個用於練習編程的用戶友好界面。 TEPL支持基本的算術計算,可變支持,邏輯運算符,布爾值,數學運算符if語句和輸入語句。
有關更多信息和文檔,請訪問TEPL文檔。
可以在src/lexer.py文件中找到lexer。可以在src/nodes.py文件中找到AST節點。可以在src/parser.py文件中找到解析器。可以在src/transpiler.py文件中找到transpiler。
有關許可證信息,請在此處檢查。
數字猜測遊戲。
PC this is a comment, and this is an example of a basic number guessing game CP
forever do
set guess to 'Enter a number from 0 to 100: ' expecting input and num
set secret to random num from 0 to 100
if guess > 100 OR guess < 0 then
output $"Error: You inputed a number that is less than or greater than 0 or 100, it was $guess!"
elseif guess > secret OR guess < secret then
output $"Wrong guess! The secret number was...$secret!"
else then
output $"You got it right! The secret number was $secret!"
end
pause 1
exit
end