使用sage math在python中输入文本
下面是我尝试使用python的代码使用sage math在python中输入文本,python,sage,Python,Sage,下面是我尝试使用python的代码 >>> import string >>> def main(): print "hey" print key = input ("key?") message = raw_input("Enter the message: ") codedMessage = "" for ch in message: codedMessage = codedMessage + c
>>> import string
>>> def main():
print "hey"
print
key = input ("key?")
message = raw_input("Enter the message: ")
codedMessage = ""
for ch in message:
codedMessage = codedMessage + chr(ord(ch) + key)
print "the coded is: ", codedMessage
>>> main()
hey
key?-1
Enter the message: hey how are you?
the coded is: gdx gnv `qd xnt>
但当我在sage math中尝试这一点时。。。。。输入功能不起作用不幸的是,据我所知,当输入和原始输入在控制台模式下从Sage工作时,从Sage笔记本也不起作用(您没有指定,但我假设您正在使用它) 不幸的是,据我所知,虽然输入和原始输入在控制台模式下从Sage工作,但从Sage笔记本(您没有指定,但我假设您正在使用)也不工作
raw_输入
在Sage Math Cloud中确实有效,不过现在有些奇怪(请参阅)。它看起来很漂亮。原始输入在Sage Math Cloud中确实有效,但现在有些奇怪(请参阅)。它看起来很漂亮