It seems the UK government (and the US too), think that we should be teaching more children to program. I think so too. I don't necessarily think that equates to us needing more "programmers".
Many jobs such as most engineering and science posts and an increasing amount of financial jobs needs not just maths, but an appreciation of programming to be able to understand critical and widespread aspects of the job. Now just as those people are not all mathematicians, but need some maths to do their job,
I think that a greater number of workers should know about programming and computers - without necessarily calling themselves programmers as the need is there.
Mainly Tech projects on Python and Electronic Design Automation.
Monday, February 24, 2014
Friday, February 21, 2014
I just created the Almost primes task on Rosetta Code:
A k-Almost-prime number is a natural number n, that is the exact multiple of k primes.A curious thing about its Python code is that I had to introduce a name terms for a partial result:
So, for example if k is 1, then this is the series of prime numbers themselves. If k is 2 then this is the series of semiprimes.
The task is to write a function/method/subroutine/... that generates k-almost primes and use it to create a table of the first ten members of k-Almost primes for 1 < = K < = 5.
StopIteration swallowingThe following will not work as any StopIteration exception raised by trying to pull more prime decomposition values from the decompose operator will just stop the iterator when we need the exception to propagate to the except clause and so return False:
Posted by Paddy3118 at 9:26 pm
- ▼ February (3)
- ► 2013 (14)
- ► 2010 (12)
- ► 2009 (42)
- ► 2008 (28)
- ► 2007 (23)