refining a programme Programming Software Development by piers … taken in from the chapters read long timesbookread = chapread/chapno; //calulation to work out number of times read bible b = Long… even and odd columsn Programming Software Development by rockX … }printf"\n" }' PS: i need to embed the calulation code into any of this code.. THANK YOU IN ADVANCE… round Programming Software Development by Akis2000 hello, i have a double value=0; and i want before starting the calulation to round this value in the numbers that the user add, for example 2... any ideas??? I have despered........... Re: round Programming Software Development by mvmalderen [QUOTE=Akis2000;865022]hello, i have a double value=0; and i want before starting the calulation to round this value in the numbers that the user add, for example 2... any ideas??? I have despered...........[/QUOTE] I don't understand that, can you give an example ? Lots of data to write, preferably in binary format. Portability issues? Programming Software Development by DarthPJB … room in the stream. //this is pretty simple actually, the calulation is: // the number of verts X ( Size of a float… input in jagged array. Programming Software Development by sloshymon … + b + c + d + e + f + g + h + l + k; //for calulation of company sales. [/CODE] Thanks for the ideas. -sloshy Re: input in jagged array. Programming Software Development by sloshymon … + b + c + d + e + f + g + h + l + k; //for calulation of company sales. { for (int i = 0; i < region… Array problem Programming Software Development by Stpdoug … want the array(totalwin) to store the value of the calulation each time it repeats say 10 times.I tried using… php calculation returns -1 Programming Web Development by lloyd.farrell.7 Hi Everyone, I have the following php calulation $tplaunch = $tplaunch - $tpsold; This calculates as you would expect. I … Re: restarting from begining Programming Software Development by snippsat … i just return and do calulation in main. They other function all calulation and exception handling is done in…CODE]def radius_1(r): '''Here we just return and do calulation in main''' pi = 3.14 return pi * r *… r def radius_2(): ''' Here we do calulation in fuction,with exception handling Try to breake it with… Re: scriptlet in javascript Programming Web Development by amarjeetsingh …"+y); changeItemValueNew(form,z,y); }[/code] if you do calulation in java script, then you must be attentative about the… Re: Prime number program Programming Software Development by Skeen … test algoritm, which does the job, but slowly: [CODE] //the calulation function. void calc (unsigned int number, unsigned int i) //using… Re: need help for project Programming Software Development by snippsat … look better. [CODE]if user_inp == '1': addExpense()[/CODE] Then make calulation in addExpense() and return value you need. Then in a… Re: php mysql update picklist amount in theory i have no clue Programming Web Development by xbat …=stock -%d and integer in form box.. but then the calulation.. Maybe If statement If item number in edit form is… Re: creating a sales table using lists (arrays) Programming Software Development by snippsat …. An example of how to do this,and doing som calulation. with open('num.txt') as f: numb_list = [[float(i) for… Re: Basic database design question Programming Databases by hanvyj … units). -Look at a 'virtual' meter that's actually a calulation of other meters. So for example, if you wanted to… Re: can anyone explain me this snippet? Programming Software Development by Mayukh_1 … is executed how & which value is further taken for calulation. So modern debugger is the answer. Re: MULTIPLE SUBTRACTION IN C Programming Software Development by ddanbe Could you show us the code of your calulation please? Re: Crystal Reports 8.5 decimal values does not show Programming Software Development by Mike Bishop convert the text to a number `If NumericText ({field}) then ToNumber ({field}) else 0` you may also have to do a calulation to make it into a decimal number Speeding Ticket Fine Calulation Programming Software Development by DumbBlonde89 So my semester is almost over and I was dumb when I signed up for intro to programming distance learning, I thought I would understand it, but now I guess I know I can't. Anyways here is the problem. A speeding ticket fine policy in Podunksville is $50 plus $5 for each MPH over the limit plus a penalty of $200 for any speed over 90mph. The first … Re: Speeding Ticket Fine Calulation Programming Software Development by DumbBlonde89 I got it figured out [code]def ask_limit(): limit = float(input ("What was the speed limit? ")) return limit def ask_speed(): speed = float(input ("What was your clocked speed? ")) return speed def findfine(speed, limit): if speed > 90: bigfine = ((speed - limit) * 5 + 250) print "… Re: Speeding Ticket Fine Calulation Programming Software Development by DumbBlonde89 Is this right? I don't know how to make is so that once it asks for the limit again to set the parameters so it won't accept a number that is less than 10 or more than 80 [code]def ask_limit(): limit = float(input ("What was the speed limit? ")) while limit < 10: print "speed limit must be faster than 10mph"… Re: Speeding Ticket Fine Calulation Programming Software Development by woooee Note that if someone enters anything other than a number, the program will fail, but It doesn't say anything about testing the input so you are probably OK as is. If you have 2 while() loops in a row, then you will have to enter the data twice, once for each loop. [CODE]def ask_speed(): speed = 0 while (speed < 5) or (speed > 130… Re: Speeding Ticket Fine Calulation Programming Software Development by jordanbray [QUOTE=woooee;581912] [CODE]def ask_speed(): speed = 0 while (speed < 5) or (speed > 130): print "\nClocked speed must be faster than 5mph and less than 130 mph" speed = float(input ("What was your clocked speed? ")) if speed < 5.0: print "Clocked speed must be … Re: Speeding Ticket Fine Calulation Programming Software Development by woooee [QUOTE]I would remove the if statement in that loop, otherwise you print information twice...[/QUOTE]It prints separate statements. One if the speed is less than 5 and another if it is greater than 130. The if/elif = (if) (else+if) so at most only one executes. They are there so that nothing is printed for speeds between 5 and 130. Re: Speeding Ticket Fine Calulation Programming Software Development by jordanbray I tested it: [code] jordan@ubuntu-gateway:~$ python tmp.py Clocked speed must be faster than 5mph and less than 130 mph What was your clocked speed? 3 Clocked speed must be faster than 5mph Clocked speed must be faster than 5mph and less than 130 mph What was your clocked speed? 5 jordan@ubuntu-gateway:~$ [/code] note that it uses… Re: Speeding Ticket Fine Calulation Programming Software Development by woooee [QUOTE]Clocked speed must be faster than 5mph and less than 130 mph What was your clocked speed? 3 Clocked speed must be faster than 5mph Clocked speed must be faster than 5mph and less than 130 mph What was your clocked speed? 5[/QUOTE]This is indeed how it is supposed to work. The first time the speed was 3, so it prints "Clocked … tf idf calulation Programming Software Development by Seher_1 how to calculate term frequency,inverse document frequency(tf-idf) for own text files that consists of many terms. Re: tf idf calulation Programming Software Development by Gribouillis You can start with computing the term frequencies for each term and every document. There is a snippet by Vegaseat [Click Here](https://www.daniweb.com/software-development/python/code/462632/word-frequency-count-revisited-python) Once you have these frequencies, [wikipedia](https://en.wikipedia.org/wiki/Tf–idf) has various formulas. Re: tf idf calulation Programming Software Development by vegaseat Also take a look at the Python module made for this sort of thing: http://radimrehurek.com/gensim/