Initial commit: Oraset programming language with documentation
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
!! 测试pylang库的python函数
|
||||
|
||||
show(`=== Testing pylang library ===`)
|
||||
|
||||
!! 测试简单的Python代码
|
||||
result = python(`print('Hello from Python!')`)
|
||||
show(`Python code result: `, result)
|
||||
|
||||
!! 测试带有变量的Python代码
|
||||
result = python(`
|
||||
x = 10
|
||||
y = 20
|
||||
result = x + y
|
||||
print(f'Sum: {result}')
|
||||
`)
|
||||
show(`Python code with variables result: `, result)
|
||||
|
||||
!! 测试更复杂的Python代码
|
||||
result = python(`
|
||||
import math
|
||||
result = math.sqrt(16)
|
||||
print(f'Square root of 16: {result}')
|
||||
`)
|
||||
show(`Python code with math result: `, result)
|
||||
Reference in New Issue
Block a user