- Strength to Increase Rep
- +6
- Strength to Decrease Rep
- -1
- Upvotes Received
- 30
- Posts with Upvotes
- 25
- Upvoting Members
- 17
- Downvotes Received
- 1
- Posts with Downvotes
- 1
- Downvoting Members
- 1
| Re: A Separation (or Separation of Nader and Simin) by Asghar Farhady. The Dreamers. Forest Gump. |
Re: Importing modules inside anonymous functions: t = lambda: __import__('time').localtime() print('Date: %s/%s/%s'%(t().tm_mday, t().tm_mon, t().tm_year)) | |
Re: PyScripter is the best one in my opinion. it supports many versions of Python code.google.com/p/pyscripter/ | |
Re: > for example I don't know what this is called » [('cat', 'meow'), ('dog', 'ruff')] It's called a list of tuples > so I can now remove the square brackets but I want to make it liek this ↴ catmeow dogrugg You can do something like this: your_list = [('cat', … | |
Re: off topic but wise ;-) Where shall I begin, please your majesty?" he asked. "Begin at the beginning", the king said, gravely, "and go on till you come to the end: then stop ." Alice in wonderland. | |
Re: def main(): with open(raw_input("Enter file name: ", "r")) as fin: for num, line in enumerate(fin.readlines()): print("%d: %s"%(num+1, line)) it is without error checking, u you can add exception catching to it. | |
Re: and... the module profession.py returns nothing! so your player will not have any of those properties. | |
Assuming that every person has a National ID number, I am trying to check if the Entered number is a valid ID number, under these conditions: 1. ID number must be of 10 digits length. 2. If ID length is greater than/equal to 8 and less than 10 digits, add … | |
Re: I'm using py4a on android and it helps me script things for my android phone. stuff like searching messages for desired words, text encryption and sending via sms reboot options for root devises bluetooth control with gui and some more, I scripted already. | |
Re: what OS does it have? Android/iOS/Win Mobile? | |
Re: just write down some code and then try to enhance it step by step. then come back here and ask your questions. what is yor algorithm or logic? | |
Re: first no need to use print when assigning a user input to a variable. secondfunction arguments are pre-requisit for function. so get those two user input vars out of the function. | |
Re: just something to start with: data_list = [line.split() for line in myFile.readlines()] | |
Re: python uses (* asterix) for multiplication. in line 54 it assumes the s(s-side1) as a function call not a multiplication. it should look like s*(s-side1)*(s-side2)... | |
Re: I dont know wx and dont know how to fill searchbox :D but for searching a word or words u can add queries to google address: www.google.com/search?q=SEARCH+WORDS query = 'what is Python' search_google = 'www.google.com/search?q=%s'%query | |
Re: you have to assign thevariable before using it. in your case, replace the line 1 and 2 with each other. in python 2.x use raw_input instead of input and then convert it to integer or float. | |
Re: what structure has the data in the text file? show some of its data. btw, range() doesnt work with float. | |
Re: define get_score(with a string argument): length = len(string) score = 0 if length < 3: score = 0 elif score > 6: score = length multiplied by 1 elif other condition: apply other rules to score ... return score | |
Re: instead of confusing while MainLoop == 1 you can use: while True: '''do stuff''' break | |
Re: EDIT. PLEASE REMOVE THIS POST. my system got problem when tried to post :D long delay in refresh, | |
Re: Book: Think Java. it is really a cool book :) | |
Re: look at the full traceback record. and it's better to post the full traceback here... | |
Re: you should return shipping_rate in the second function: def shippingRate ( poundage , classification ): return poundage * classification | |
Re: what is your targeted devise? if sysmbian: import inbox box = inbox.Inbox(inbox.EInbox) for sms_ID in box.sms_messages(): print box.content(sms_ID) | |
Re: if you mean to write and run code, there is no support for python 3.3. SL4A only supports 2.6.2 and 3.0.1. | |
Re: post your code and traceback if you want to attract forum's experts attention. otherwise you wont get any help ;) | |
Re: simplest way: url= 'http://maps.google.com/maps?q=%s+%s' % (latitude,longitude) | |
This is me with another project for beginners :) The Project as stated by ZZucker about 2 months ago: "Given the length of three sides, write a function that checks if it is possible to create a triangle." I could solve it with an annonymus function like this: is_triangle = … | |
Re: you can repeat your code for every word in string.split then join them at the end. | |
This is and answer to one of the Vegaseat's recent projects for beginners. I share my solution here because -as a begginer and do learn python as a hobby- I need your feedback. So please tell me am I doing it the right way? Thanks in advance for comments from … |