Symbian Platform Python MCQs

Symbian Platform Python MCQs

These Symbian Platform Python multiple-choice questions and their answers will help you strengthen your grip on the subject of Symbian Platform Python. You can prepare for an upcoming exam or job interview with these 90+ Symbian Platform Python MCQs.
So scroll down and start answering.

1: Which of the following is the prerequisite for registering a key event in PyS60?

A.   You need to assign the appuifw.canvas object to the application body.

B.   You need to bind a callback function to a specific event.

C.   You need to declare a parameter of redraw_callback in your application.

D.   All of the above 

2: Which of the following values of the type parameter of a dialog are accepted in the query() function in Python for S60?

A.   date

B.   double

C.   integer

D.   code

E.   query 

3: Which of the following is/are true about the tuples used in PyS60?

A.   Tuples are generally declared:
red= [255,0,0]

B.   Tuples are useful when you don't want a function to be able to change your data.

C.   Tuples are immutable and you cannot add, remove or modify its value after creating it.

D.   It is very difficult to unpack values from tuples back to individual variables. 

4: Which of the following functions are provided by the Kernel and hardware services of the Symbian Operating System?

A.   Digital TV hardware abstraction

B.   Unicode 3.0 and support for different languages

C.   Demand paging of read-only code and data

D.   L2 cache support

5: What happens if you try to record a sound file on an existing one?

A.   The existing sound file gets replaced by the new one.

B.   The new sound gets inserted at the starting of the existing file.

C.   The new sound is appended to the end of the existing file.

D.   The old sound file gets renamed and the new one is saved.

6: A user writes the following PyS60 script and declares his own PHONE_NUMBER. What will be the output when he tries to run the code?
import messaging, inbox, e32
PHONE_NUMBER = "+189823801102"
nasty_words = ["Java", "C++", "Perl"]
def message_received(msg_id):
     box = inbox.Inbox()
     msg = box.content(msg_id)
     sender = box.address(msg_id)
     for word in nasty_words:
          msg = msg.replace(word, "XXX")
     messaging.sms_send(PHONE_NUMBER, msg)
     print "Message from %s goes to %s" %\
            (sender, PHONE_NUMBER)
box = inbox.Inbox()
print "activated"
app_lock = e32.Ao_lock()

A.   It will give an error because the user can't mention his/her own number in the PHONE_NUMBER variable.

B.   It will forward the message to his own number recursively.

C.   It will forward the message to his own number only once.

D.   None of these 

7: Which of the following variables must be set to increase the size of the application body of the PyS60 console in a mobile?





8: Which of the following functions is not supported by the camera module of pys60?

A.   white_balance_modes()

B.   min_zoom()

C.   flash_modes()

D.   image-sizes() 

9: Which of the following statements are true about the concept of components with regard to Symbian Software Structuring?

A.   They are a collection of files needed to build and test at least one target file.

B.   They have their own source tree where all the source files and other package files must be contained.

C.   They are used to implement programming interfaces, that are under change control.

D.   All components are aggregated into packages owned and maintained by a single organization. 

10: Which of the following objects is provided by the PyS60 platform application that is responsible for opening various types of files like images and web pages?

A.   Content_handler

B.   Show_text

C.   Start_exe

D.   Screen 

11: Which of the following modules needs to be imported in an application if a user wants to use functions like active_profile() and signal_bars()?

A.   e32

B.   sysinfo

C.   socket

D.   e32dbm 

12: Which of the following roles is performed by the blit() function in PyS60?

A.   It allows you to copy one image onto the other.

B.   It allows you to set the initial image color.

C.   It allows you to draw the primitives directly on the canvas.

D.   It allows you to convert the current view to a new image object and return it to the caller. 

13: What is the default shape of the source image when you copy one image to another in PyS60?

A.   Rectangle

B.   Point

C.   Ellipse

D.   Polygon 

14: Which of the following modules allows you to react to key events even if some other S60 application is active?

A.   keyCapturer

B.   key_codes

C.   appuifw

D.   keycapturer

15: What is the significance of using the time() function in your PyS60 script?

A.   It is used to fetch the time when the message was first created.

B.   It is used to fetch the time when the message was received.

C.   It is used to provide the last sorted message time.

D.   It is used to fetch the time when the message was sent. 

16: Analyze the following code for creating tabs that are used to switch between different application pages. What is the output of the code? Line 1: import appuifw Line 2: import e32 Line 3:app1 = appuifw.Text(u"Appliation o-n-e is on") Line 4:app2 = appuifw.Text(u"Appliation t-w-o is on") Line 5:app3 = appuifw.Text(u"Appliation t-h-r-e-e is on") Line 6:def exit_key_handler(): Line 7: app_lock.signal() Line 8:def handle_tab(index): Line 9: global lb Line 10: if index == 0: Line 11: = app1 Line 12: if index == 1: Line 13: = app2 Line 14: if index == 2: Line 15: = app3 Line 16:app_lock = e32.Ao_lock() Line[u"One", u"Two", u"Three"],handle_tab) Line = u"Tabs"Line = app1 Line = exit_key_handler Line 21:app_lock.wait()

A.   The code will run successfully.

B.   There will be function declaration error in line 6.

C.   The value of handle_tab can not be directly set to a function.

D.   There will be a syntax error for declaring the function in line 17. 

17: What does the concept of dynamic time signify in the context of designing a game application for S60 mobile phones?

A.   It signifies the ability to change the length of the pause in the event loop.

B.   It signifies the ability to prevent flickering when moving graphics are shown.

C.   It helps in generating integer values dynamically between the maximum and the minimum values.

D.   None of the above

18: Which of the following syntaxes is used to add a new element to the following list?
mylist = [u"Symbain", u"PyS60",u"MobileArt"]

A.   mylist.add(u"Fun")

B.   mylist.append(u"Fun")

C.   mylist.update[u"Fun"]

D.   mylist.insert(u

19: What function does the following code perform?
import inbox, appuifw, e32
def message_get(msg_id):
        box = inbox.Inbox()
        appuifw.note(u"New message: %s" % box.content(msg_id))
box = inbox.Inbox()
print "new SMS messages.."
app_lock = e32.Ao_lock()
print "Message handled!"

A.   That of an SMS sorter

B.   That of an SMS Game Server

C.   That of an SMS receiver

D.   That of an MS Inbox

20: What does the bind() function represent in the PyS60 script?

A.   It represents the binding of a callback function to an event that is generated by an incoming message.

B.   It is used to bind the function name to its definition.

C.   It is used to bind the message content to the message ID.

D.   None of the above 

21: Can a file within a package contain hardcoded references to the package directory location in Symbian?

A.   Yes

B.   No 

22: What function does the address() perform in a PyS60 script?

A.   It returns 0 and 1 based on whether the message is unread or read.

B.   It returns the receiver's phone number.

C.   It returns the address of the corresponding receiver's phone number.

D.   It returns the sender's phone number. 

23: Can different cell IDs map to a single area code in case of GSM and GPS positioning in PyS60?

A.   Yes

B.   No 

24: The code snippet below is used to access the SMS inbox. What is the use of declaring the array [:5] in line 3?
Line 1:import inbox, appuifw
Line 2:box = inbox.Inbox()
Line 3:for sms_id in box.sms_messages()[:5]:
Line 4:      msg = box.content(sms_id)
Line 5:      appuifw.note(msg)

A.   It is the slicing operator which limits the list returned by the sms_messages to five.

B.   It is the slicing operator which slices the first 5 characters and set to sms_id.

C.   It is the slicing operator which reads messages which come in multiples of 5.

D.   It is the slicing operator which reads an sms having five as a part of its content.

25: Which of the following statements is true about the sms_messages() function of the PyS60 platform?

A.   It returns the message Ids for all the messages in the SMS inbox of your phone.

B.   It returns the number of messages in the SMS inbox of your phone.

C.   It returns the content of a message corresponding to a specific ID.

D.   It uses the sender's phone number as one of the parameters for sending messages.

26: Which of the following modules supports the current_position() function of the S60 platform?

A.   e32db

B.   graphics

C.   audio

D.   appuifw 

27: Which of the following sound formats are supported by the S60 platform while trying to record the sound on a phone?


B.   AAC

C.   Real Audio

D.   AMR 

28: Which of the following parameters are accepted in the canvas()function of PyS60?

A.   key_clicked

B.   redraw_callback

C.   key_code

D.   event_callback 

29: Which of the following elements of graphical user interface is used for two-field text input dialog?

A.   multi-query

B.   note

C.   query

D.   popup menu 

30: Which of the following syntaxes follows the convention for declaring strings in a PyS60 application?

A.   txt = "Episode XXXIV"

B.   txt = 'Bart said: "Eat my shorts"'

C.   txt = """Homer's face turned red. He replied: "Why you little!""""

D.   All of the above

31: What function does line 5 perform in the following PyS60 code?
Line 1:import appuifw, e32
Line 2:def quit():
Line 3:    print "Exit key pressed!"
Line 4:    app_lock.signal()
Line = quit
Line = u"First App!"
Line 7:appuifw.note(u"Application is now running")
Line 8:app_lock = e32.Ao_lock()
Line 9:app_lock.wait()
Line10:print "Application exits"

A.   This line passes the value of the quit function to the variable.

B.   This line tells Python which function is dedicated to handling the Exit events.

C.   This line just passes the function name, not its value to the variable

D.   This line represents the callback function and will be activated when the user decides to quit the application.

32: Which of the following functions is/are used to convert text to speech and let the text speak aloud


B.   audio.speak()

C.   audio.say()

D.   sound.speak()

33: Which of the following correctly describes the location of the source tree packages in the Symbian platform?

A.   <root-directory>/<component>/<collection>

B.   <root-directory>/<component>/<layer>

C.   <root-directory>/<layer>/<package>

D.   <root-directory>/<layer>/<component>/<package> 

34: A user wants to send a photo through Bluetooth and needs to find the target device. Which of the following functions allows him to do so?

A.   socket.bt_obex_discover()

B.   socket.bt_discover()

C.   socket.bt_advertise_service

D.   socket.bt_discover 

35: Which of the following statements is used by PyS60 application in order to redirect the debugging output to a file?

A.   write>>logfiles

B.   print<<startlogging

C.   write<<logs

D.   print>>logfile 

36: Which of the following functions is used to download a file from the web and save it locally in your phone?

A.   urllib.urlopen()

B.   urllib.urlretrieve()

C.   urllib.urldownload()

D.   urllib.quote() 

37: Every file present in the hierarchy of the Symbian platform is owned by one and only one component, collection, package and layer?

A.   True

B.   False

38: What function is performed by Radio Frequency Communication(RFCOMM) during communication over Bluetooth?

A.   It is responsible for transferring files and photos over Bluetooth.

B.   It is responsible for sending and receiving streams of text and raw data.

C.   It is responsible for identifying a device and providing services to it.

D.   It is responsible for discovering the services of the other phone.

39: Which of the following is a valid syntax to specify the number of times a sound should be played in PyS60?

A.   play(15)

B.   play(times=15)

C.   play(audio.KMdaRequest)


40: What is the significance of the negative sign before -box.time(sms_id) in the inbox sorter application of PyS60?

A.   It is used to place the unread messages at the top of the list.

B.   It is used to place the newest message at the top of the list.

C.   It is used to place the already read messages at the top of the list.

D.   It is used to place the last message present in the inbox.

E.   None of the above 

41: What will be the output of the following code snippet?
Line 1:import appuifw
Line 2:pwd = u"secret"
Line 3:info = appuifw.multi_query(u"Username:", u"Password:")
Line 4:if info:
Line 5:    login_id, login_pwd = info
Line 6:    if login_pwd == pwd:
Line 7:        appuifw.note(u"Login successful", "conf")
Line 8:    else:
Line 9:        appuifw.note(u"Wrong password", "error")
Line 10:else:
Line 11:    appuifw.note(u"Cancelled")

A.   It will produce an error for multi_query() function at line 3.

B.   It will produce an error due to invalid assignment of the value to a variable in line 5.

C.   It will produce an error as the syntax for the if statement is incorrect.

D.   It will run successfully. 

42: What will be the output of the following code?
list = [3, 2, 1, "go"]
print "Counting: %d, %d, %d, %s" % tuple(list)

A.   Counting: 3, '2', 1, 'go'

B.   Counting: 3, 2, 1, 'go'

C.   Counting: 3, 2, 1, go

D.   Counting: 3, 2, '1', 'go'

43: What function does the module gles perform if included in the PyS60 application?

A.   It provides access to phone's internal database with simple dictionary-like syntax.

B.   It provides an object for displaying the 3D graphics.

C.   It allows Python bindings to OpenGL ES 2D and 3D graphics.

D.   It provides user interface control for displaying OpenGL 3D graphics.

44: Which of the following parameters can be used with the camera.start_viewfinder() function of PyS60?

A.   exposure_modes

B.   callback function

C.   size

D.   modes 

45: Which of the following states returned by the state() function of the audio module in PyS60 is invalid?

A.   ENotReady

B.   Duration

C.   ERecording

D.   Eopen 

46: Which of the following values is considered a default type in the note() function of PyS60?

A.   error

B.   conf

C.   code

D.   info 

47: Analyze the following code snippet:
txt="one: two: three: four: "hello how" print txt.split(":") What is the output of the above code?

A.   ('one', 'two', 'three', 'four', "hello how")

B.   ['one', 'two', 'three', 'four', "'hello how'"]

C.   ('one', 'two', 'three', 'four', 'hello how')

D.   ['one', 'two', 'three', 'four', 'hello how'] 

48: Which of the following positioning techniques is supported by S60 mobile phones?

A.   external GPS over bluetooth

B.   GSM cell IDs

C.   internal GPS

D.   All of the above

49: Which of the following sound formats is/are not supported by the Python S60 platform?

A.   AAC

B.   AMR

C.   Real Audio

D.   None of the above

50: What does the sound format MIDI stand for in PyS60?

A.   Multimedia Instrument Digital Interface

B.   Music Instrument Digital Information

C.   Multimedia Instrument Digital Interface

D.   None of the above