class information(object): #version 1 build=1 majorVersion=0 minorVersion=1 bugFixes=0 optimization=0 versionId=str(majorVersion)+'.'+str(minorVersion)+'.'+str(bugFixes)+'.'+str(optimization) changelogs='1)infinite procedural generation added\n2)new blocks:dirt,grass,coal ore,iron ore,diamond,ore,gold ore,etc' versionName='World is here' print("version:"+information.versionId) print('\n') print('changelogs:') print(information.changelogs) print('\n') print('version name:'+information.versionName) print('\n') print(build)
Output:version:0.0.1.0
changelogs:
1)infinite procedural generation added
2)new blocks:dirt,grass,coal ore,iron ore,diamond,ore,gold ore,etc
version name:World is here
but,there is one error
Error:Traceback (most recent call last):
File "information.py", line 22, in <module>
print (build)
NameError: name 'build' is not defined
note:the code,output and error above is edited a little(not the original)Nevermind,my mistake,found the problem and fixed it.