我正在尝试使用 Genie 创建一个简单的 Hello World 程序,但我希望能够在终端上输入一些输入。我的目标是在 Genie 中重复以下 python 代码:
#!/usr/bin/env python
print 'Hello. I am a python program.'
name = raw_input("What is your name? ")
print "Hello there, " + name + "!"
到目前为止,我所做的是;
[indent=4]
uses System
init
print "Hello. I am a python program."
var name = Console.ReadLine("What is your name? ")
print "Hello there, " + name + "!"
但是我得到了一些错误,可能是因为我对语言一无所知,这是错误:
hw.gs:4.5-4.10: error: The namespace name `System' could not be found
System
^^^^^^
Compilation failed: 1 error(s), 0 warning(s)
hw.gs:3.6-3.11: error: The namespace name `System' could not be found
uses System
^^^^^^
Compilation failed: 1 error(s), 0 warning(s)
我究竟做错了什么?
谢谢。