The present code snippet just does an especific task. This is, given an ordered sequence of natural numbers, starting at zero, generate all the different permutations there can be. When we talk about permutations, the order of the sequence does matter. So, the sequence 0, 1, 2 differs from 2, 0, 1. For example, think about a 4-7-2 lock combination sequence. Changing the sequence to 2-7-4 would not open the lock, of course. Properly speaking in mathematics, we are talking about permutations, because the order does matter. On the other hand, if the order did not matter, we would be … +0 I am interested in technology, however I do not wish to go to university and after stumbling upon the MIT Challenge, I have taken it as a proof of concept. Clearly education is changing, and I would like to take a less traditional route. But before I go too far, I would like to set a road map, and stick to it. I am worried that the things I plan to do are not enough, or are not the right things, and so I would like some advice from those who are more experienced. I initially plan to study mathematics … +0 Hi. I need help with a program. It is a simple program where it looks for a sequence of numbers (between 1000 and 9999) where the sum of 4 sequential numbers to the 4th power = a 4 digit number comprised of those 4 original numbers. (I know... see example). Example: 1^4 + 2^4 + 3^4 +4^4 = 1234. I thought I could run a "while" loop. "While total <= 9999". Run the logic... A = 1 B = (A+1) C = (A+2) D = (A+3) I thought I could run a "while" loop. "While total <= 9999". "if" A^4 … +0 Hello everyone. Im COMPLETELY new to programming and Ruby and i would like to know how i can make this happen: What I want from my program is to understand letters as numbers then add up names into numbers and then retreive previously written names when number x is given. For example A=1, B=2 C=3 K=4 etc. then i write BACK the program adds letters up(2+1+3+4) and prints 10. then i write KCAB, program adds up again into 10... then i write ABCK, program adds, prints 10... And when i open the program next time and write something like DIG … +0 Hi, I'm trying to reverse the ordering of number. I'm given an array of size.. say, 5. WITHIN a do-while loop, I must iterate from element 0 to 4. For example, if the element contains ["Apple", "Banana", "Cow", "Dog", "Egg"], the output of the do-while loop has to be: Apple Banana Cow Dog Egg I have tried (in C#): int numOfElements = array.Count; //Number of elements. do { TextBox.Text += array[numOfElements-1] + " "; numOfElements--; } while (numOfElements != 0); ...but obviously this will print out "Egg Dog Cow Banana Apple", which is the reverse order of what I'm tring … +0 .class public Contest .super java/lang/Object ; ; Team members: Bianca Cutler ; ; ; ; ; Your assignment is to fill in the fibs method below ; so that it creates (exactly) the output you see in ; fibsgolden.txt ; ; The contest will be won by those entries that compute the ; correct output and whose bytecode files are smallest ; ; For reference, a solution in Java is presented in Fibs.java ; ; ; ; standard initializer ; .method public ()V aload_0 invokenonvirtual java/lang/Object/()V return .end method .method public static fibs()V ; set limits used by this method … +0 How would I do this in 1 line [code] $name =$firstName + " " + \$lastName; //output: 0 [/code] the problem is what I think it is, is that its trying to add like mathematics. whilst I want the '+ " " +' to become a space in between the firstname and lastname variables. +0 This is hopefully example of properly tested code snippet (fingers crossed). +0 Hi all, I have been doing for fun this problem in projecteuler.net. The problem is as follows: +++++++++++++++++++++++++++++++++++++++++ Peter has nine four-sided (pyramidal) dice, each with faces numbered 1, 2, 3, 4. Colin has six six-sided (cubic) dice, each with faces numbered 1, 2, 3, 4, 5, 6. Peter and Colin roll their dice and compare totals: the highest total wins. The result is a draw if the totals are equal. What is the probability that Pyramidal Pete beats Cubic Colin? Give your answer rounded to seven decimal places in the form 0.abcdefg +++++++++++++++++++++++++++++++++++++++++ [CODE] #!/usr/bin/python from datetime import datetime … +0 I'm having trouble with a for loop! I'm trying to solve a differential equation using Euler's method like so; [TEX]\displaystyle\frac{dy}{dx} = 7{y^2}cos(y^2)-3e^{xy}, \ \ \ 0 \leq x \leq 1 \ \ \ y(0) = 0[/TEX] This is solved using the algorithm [TEX]y_{n+1} = y_n + hf(x_n , y_n)[/TEX] Where [TEX]h[/TEX] is the step size and [TEX]f[/TEX] is the right hand side of the ODE. Now, I need to write a program to solve this ODE , using an appropriate step size, and outputting a table of values with [TEX]x[/TEX] and [TEX]y[/TEX] in the range [TEX]0\leq x \leq 1[/TEX] Heres … +0 Hi guys, I hv the two coordinates of the map. Top left : 37 44 55.49S 144 52 30.73E bottom right: 37 47 54.43S 144 57 59.54E my map is a rectangle with 500width 800height. I want to get the mouse pointer in terms of lat long in degrees and minutes with x,y through out the map.Example if i click the map it should return lat, long and x, y) How do i convert the coordinates to something mathematical? How am i going to achieve this ? Thanks in advance Regards, Nishan +0 Here's a simple question. Need: => to use scipy special package function in my python prog (python2.6). 1. Downloaded & intalled numpy for python2.6 2. Downloaded & intalled scipy (scipy-0.8.0-win32-superpack-python2.6.exe) tested: import numpy import scipy - everything's ok According to scipy docs, a package needs to be loaded before a function from it can be called (for reference: the function I need is Bessel modified function of first kind of any real order). Tried (from interpreter): from scipy import special - CRASH! >:/ Tried from file test.py. Content of test.py: from scipy import special print "Hello!" Run from command line: … +0 I just can't seem to solve this. Heres what I want to do: I want my program to calculate movement, from one point to another. The function _updatepos is the main function, where I have troubles. It is supposed to, as the name says, update the position (posx and posy), and move it a bit closer to the destination (desx and desy); I would be very thankful if you could help me, thanks in advance! [CODE]#include #include #include using namespace std; time_t current_time; double posx = 10000; double posy = 10000; double desx = 0; double desy … +0 Hi buddys at school we are now working with functions and derivates (or how you spell it) and im getting kind of tired to write the same thing the hole time in the calculator and on the paper plus the fact that i need something to program. So i was now trying to do the simple program first to use in the terminal(but then im going to develop it maybe into an applet), but the thing is that i cant find the way to make the user to input the functions both letters and numbers in an easy way to … +0 This snippet defines a class LebsegueSet which instances represent sets of real numbers, namely finite unions of intervals. Set theoretical, topological and measure theoretical operations are implemented in pure python. Use freely and enjoy ! +1 I want get a root of number in C# what library i must to insert and what command solve it +0 When it was reported this week that [URL="http://www.itwire.com/content/view/20747/1066/"]Professor Stephen Hawking[/URL] had been taken into hospital and was "very ill" the overall mood of the media seemed to be that the Lucasian Professor of Mathematics at Cambridge University and author of the best selling 'A Brief History of Time' book was as good as dead. Indeed, many of those reports read more like obituaries than anything else. However, I am glad to say that [URL="http://www.telegraph.co.uk/news/uknews/5193802/Family-of-Stephen-Hawking-hopeful-of-full-recovery-after-hospital-admission.html"]the truth is now emerging[/URL] and it would appear that far from being at death's door, Professor Hawking is actually in a comfortable condition and according to … +0

The End.