You Are Here:

Community: Developer Discussion Boards

#1 Old need help with python - 2006-06-23, 15:49

Join Date: Jun 2006
Posts: 2
mizi_joe
Offline
Registered User
I never have any experience programming using Python language before (only knows C....and im totally a newbie.. ), and since nokia phone can run script using python s60 , i try creating some simple program for my nokia.. the first program i created is a simple program to calculate my average mark (im a student) and total mark
Quote:
import appuifw

a=appuifw.query(u"Input Number of Subjects","number")
x=0
for i in range(a):
data=appuifw.query(u"Input marks =","number")
x=x+data
ave=x/a
print "total=",x
print "average=",ave
if ave <= 60:
appuifw.note(u"work hard!!","error")
elif 80 >ave > 60 :
appuifw.note(u"dont give up","info")
else :
appuifw.note(u"good job!!","conf")
my question is how to display the average mark and total mark in an pop up message..what function should i use?.... and how to display the number in decimal form (like in C language printf("%f",ave) ).....? ..ur help will be gladly appreciated...thanx...
Reply With Quote

#2 Old Re: need help with python - 2006-06-26, 18:08

Join Date: May 2006
Posts: 3
pawelbrzez
Offline
Registered User
I'm not a programmer , but :
Quote:
>>text=" text "
>>print "any"+text
any text
Or
Quote:
>>number = 898
>>print number
898
>>print "Number " + str(number)
Number 898
This is code from my brain , it may not work but I think that work in 70%



-------------------------------------------------------
Sorry for my English
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules

You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump
Similar Threads
Thread Thread Starter Forum Replies Last Post
Python for Series 60 released on Forum Nokia! eriksmartt Python 5 2009-07-14 18:00
Use filebrowser.py to execute your python scripts. zweiberg Symbian Tools & SDKs 1 2006-11-01 14:24
Python 2.2? 2.3? mflux Python 3 2006-06-26 23:36
Python C++ Extension with Callback crashing diggerdeep Python 2 2005-11-10 17:33
How to capture a snapshot with Python on Series 60 phones? harrygoesnokia General Symbian C++ 0 2004-07-18 01:56

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia