3,386 Posted Topics
Re: You are making one or you want to find teacher to teach you to make one? How much you are willing to pay? Or you want to hire programmer? | |
Re: After graduating to GUI, it looks worthwhile to check patterns from [url]http://ui-patterns.com/[/url] | |
Re: Notice though that in case of multiple pops and pushes you have the value order reversed in other stack. You should tell what you plan to do with this program, maybe you are not doing the correct thing. | |
Re: The posted code also has unterminating while loop as value of index does not change. | |
Re: Here you are: [url]http://www.cppreference.com/wiki/language/operator_precedence[/url] | |
Re: I think best way is to find closest plugin existing and modify that. Surely you have familiarized yourself with documentation like [url]http://live.gnome.org/Rhythmbox%20Plugins/Python%20Plugin%20Examples[/url] | |
Re: return max; max=maxDistance(distance, day); } How on earth is the program going to go past that return? | |
Re: I do not understand why you are trying to tokinize NULL pointer. [url]http://www.cplusplus.com/reference/clibrary/cstring/strtok/[/url] | |
Re: Why must you combine the tables if you only need to iterate through them, why not chain the iterations of th tables? I do not know exact way, but in Python I would use itertools.chain(sequence_of_dicts) | |
Re: WaltP is giving good advice. To start one good possibility is to be computer yourself and to do one game on paper. This is called use case and it is one of my favorite ways to program. Code this game as program with fixed value for correct row. Even you … | |
This code determines if datetime object represent first workday of month, but it does not consider the special days like New Year (this year weekend but last year Friday). Reaction to Basic efforts in: [url]http://www.daniweb.com/software-development/legacy-and-other-languages/threads/362098[/url] There algorithm idea given by [URL="http://www.daniweb.com/members/jonkiparsky/775324"]jon.kiparsky[/URL] based docstring says 'workday' when it should be 'weekday': … | |
Re: Good thinking Jon! Still I do not get why you must be so complicated, those extra variables do not help anything for my opinion. I can write this in Python as I do not like to learn quirks of your BASIC. Here is my Python code, even this is obviously … | |
Re: [QUOTE=karlamadeus;1551742]Python is a lot of fun, and its quite logical in regard to math.[/QUOTE] And for maths 'batteries included' with Python nothing beats Sage. | |
Re: [QUOTE=nezachem;1551807]Just wonder what does it print at line 23... Do you realize that 10^100 takes 30+ bytes as an integer? For the rest, read the [URL="http://en.wikipedia.org/wiki/Cyclic_number"]math[/URL].[/QUOTE] Did not do this yet but the math is actually in [url]http://en.wikipedia.org/wiki/Cyclic_permutation_of_integer[/url] | |
Re: Please push first (CODE) button and then paste your code or paste code, high light and push code. I could not decipher your code as end is not defined in expression y(end) This I got: from math import * def simpson(y, a,b,N): s = 0 f = lambda x: eval(y) … | |
Re: [CODE]raise SystemExit('Bye, bye') [/CODE] does not work? | |
Re: Use datetime from datetime for time arithmetic and formating and shelve, json or cPickle for savÃng Python data. You can use normal print formating operations with % operator or .format method to write to file formated text without csv module. To keep space in data easiest is to use ';' … | |
| |
Re: If you only want to regenerate decimals of value of pi, you might adapt this Python code to C. [url]http://www.daniweb.com/software-development/python/code/362329[/url] Surely there exist ready implementations similar in C, but I assume you need to do something yourself to learn something. | |
Re: Post your algorithm, code for try, and attach the test file (advanced view, manage attachments) error log and explanation of what you did to debug the program. There is plenty of posts on subject even here in DaniWeb, algorith for recursive solver s very well explained in this post in … | |
Re: This opens the xls file in default program cross platform way: [CODE]import webbrowser webbrowser.open('Modules.xls') [/CODE] | |
Re: Django runs with Python so have you tried [url]http://code.google.com/p/geopy/[/url] or [url]http://code.google.com/p/pymaps/[/url] | |
Re: First you must learn to return values or to append to list or add to dictionary the values. playerQty etc is local variables in function. See my post of [URL="http://www.daniweb.com/software-development/python/code/360376"]Dice throwing game variable players and throws[/URL] for my preferred form of input by function (of course you need to adapt … | |
Re: And you need not sleep 5 seconds, you can count how many seconds is left to alarm and not do loop at all, only one sleep, if time does not need super accurate. | |
Re: What is wrong with: [CODE]print(open("scores.txt").read())[/CODE] Just save the scores correctly in first place. | |
Re: Looks like you gave solution, but the flipped variable is not necessary when you can just output directly. | |
Re: You can not expect others to check your calculations, when you are not presenting any, only final results an done sub-result for the new cycles for floating point. As that single step is wrong and counter example is enough to proove things are wrong, your result is surely wrong. My … | |
Re: Notihing except trying to access local variables of function, which do not exist outside the scope of function. you must return them or for example append to list of creatures passed as parameter. | |
Re: What if you knew next value of each sorted file? Could you find the next sorted value in result file? Try it yourself with arranged values in pieces of papers in four piles and produce result pile (you must put the chosen pieces to result pile upside down and turn … | |
To do rules of DaniWeb more easy to grasp I have one idea for discussion (there is certain post at the moment in Other Languages as immediate cause, for other background see my [URL="http://www.daniweb.com/software-development/python/threads/359823"]Homework Challenge[/URL] post) My suggestion: [COLOR="Red"][B]DaniWeb voluntaries help you with 10% of the effort that you show … | |
Re: What is type of number you are print? What should we do to find the total? | |
Re: You are missing the (CODE) button before pasting your code, so that we can read your code (tabulation otherwise lost). Where is you distance/collision logic? What is c1, you have not defined it anywhere in your posted code? | |
Re: put in line 3 [CODE]print ''.join('%8i' % value for value in a[i])[/CODE] That is older formatting c-style, as you seem familiar with it. (untested from mobile but prinsiple should be right) | |
Re: I do not understand why you mentioned IDLE as it is not con sole application but you mean that you have problem running ipython from cygwin console? | |
Re: [QUOTE=;][/QUOTE] It is possible that you are setting class variables instead of setting values for instance in __init__. For me looks like you would not need two classes as you are not changing any functionality, but both your objects are of same type. Read up on Python philosophy of 'duck … | |
Re: Free pascal has download for nintendo ds, so there is hope: [url]http://www.freepascal.org/download.var[/url] But it is maybe cross compiler for PC like [url]http://www.freepascal.org/down2/arm/nds-ftp.freepascal.org.var[/url] | |
Re: You are mixing list object with list access by indexing. You can not construct list from integer but only from iterable. list(posn) in pseudo code means name_of_list[posn] in Python (or posn-1 if indexes must be made zero based from one based) lines 3, 4 and 10 also have no purpose … | |
Re: Post your code by first pushing code tags, see my post[URL="http://www.daniweb.com/software-development/python/threads/359823"] Homework challenge ;)[/URL] | |
Re: You might like to read the thread [url]http://www.daniweb.com/community-center/geeks-lounge/threads/115462[/url] if you have not all ready for the regulars. | |
Re: and how would the lines 16 to 18 would then be executed? Variable i is not reset in while loop. | |
Response to hijacker of thread: [url]http://www.daniweb.com/software-development/python/threads/59745[/url] | |
Re: What is your problem and what kind of errors are you getting? | |
Re: Set d anything but empty value meaning false at line 5, for example: [CODE]d = "My value is True"[/CODE] Then reconsider the variable names and read the [URL="http://www.python.org/dev/peps/pep-0008/"]PEP8[/URL] to prepare for the future. | |
Re: datetime module is standard, just import it in begining of your program with [CODE]import datetime[/CODE] Have you tried to search this forum for "date time python"? There is much usefull information here like [URL="http://www.daniweb.com/software-development/python/code/216475"]this[/URL] | |
Re: Check binascii module, it should have what you need: [url]http://docs.python.org/library/binascii.html[/url] | |
Re: I understand that this is fill in blanks program from teacher. You should explain your problems one by one including error messages. Also this program is first time I see complex numbers not including real numbers. Seems strange to have numbers that can express result of sqrt(-1) but not 1/2 … |
The End.