Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries over the next few weeks. Thanks for all your past and future contributions.

Archived:Quiz game in PySymbian

From Wiki
Jump to: navigation, search

Archived.pngArchived: This article is archived because it is not considered relevant for third-party developers creating commercial solutions today. If you think this article is still relevant, let us know by adding the template {{ReviewForRemovalFromArchive|user=~~~~|write your reason here}}.

The article is believed to be still valid for the original topic scope.

Article Metadata
Created: jimgilmour1 (20 Feb 2009)
Last edited: hamishwillee (31 May 2013)


I have created game in Python which ask us one question. And question contains four answers we have to select the correct and if we give wrong answer then the message is displayed that your answer is wrong and if we give correct and then message is displayed that your answer is correct.This is the game which gives you idea to create question and answer in Python.

Code is given below it is in python and it will work in all S60 phones.

Code snippet:

import  appuifw, e32
app_lock = e32.Ao_lock()
#Define the exit function
def quit():
app_lock.signal() = quit
#given the title name rahul'game'
#Create an instance of Text and set it as the application's body
t = appuifw.Text() = t
#Set the color of the text
t.color = 0xFFF00F
#Set the font by name, size and flags
t.font = (u"LatinPlain12", 20, None)
#we have to write question as text
t.add(u"que.1 who is the president of india ? for answer click on options")
def op1(): #defining the callback functions
appuifw.note(u"your answer is correct","info")
def op2():
appuifw.note(u"your answer is wrong","info")
def quit(): #defining the exit function
#making the actual application menu = [(u"Pratibha Patil",op1),(u"Sonia Gandhi",op2),(u"Indira Gandhi",op2),(u"Dr. Abdul Kalam",op2)]
#Wait for the user to request the exit

To do: I have created only one question and four answer for the testing. Here you can create a chain of question and answer for complete game.

And you can make this game more attractive by some modification. So it will look attractive.

This page was last modified on 31 May 2013, at 01:05.
73 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.


Thank you!

We appreciate your feedback.