User Profile
Collapse
-
Industrial Light and Magic, a special effects company for Hollywood that was started by George Lucas to do the original Star Wars films, uses Python extensively. They do a TON of sfx work for some pretty major films. -
'Monty Python' is the name of a BBC comedy troupe. John Cleese is perhaps the most famous of them now, but a quick google search will bring up more information than you can throw a holy hand grenade at. 'Monty Python's Flying Circus' was the name of their television show, and they had several movies, 'Monty Python and the quest for the holy grail' (or something along those lines, 'Monty Python's the Life of Brian,' and 'Monty Python and the Meaning...Leave a comment:
-
Thanks Barton, i've seen that one before, and it's definitely a lot more efficient than the way I am going about it. Specifically though, I'm trying to calculate all the primes between two given numbers, mainly so that I can skip directly to the higher numbers, such as 10 ** 9. Also, for learning purposes, I can't quite figure out what is wrong with the code... Loismustdie fixed the problem with it crashing, however it now just prints out every...Leave a comment:
-
Crashing prime number calculator
Well, I've been picking at learning python, got tired of reading, and figured I'd try to replicate my prime number generator I wrote (with much TSDN forum help) in C++. I've hit a stumbling block... the program is supposed to print onscreen all the prime numbers between two numbers given to it, so if I put in 1 and 10, it should print out 1, 3, 5, 7 (I know, technically 1 isn't considered prime, and 2 should be on there, but otherwise...) Which... -
Within-LAN remote connection
I have a wireless network set up on several computers, and was wondering how I would go about accessing a file on one system from another. Let's say a document on the kitchen computer, and I want to work on it from my laptop in my bedroom. How would I do this? I tried just punching in the IPs listed in my router's DHCP client log, but that didn't work so obviously this is more complicated than I thought... I am running Ubuntu Linux on my laptop,... -
Books for learning Python
I am interested in learning Python, and have narrowed my search to two books: Learning Python by Mark Lutz, and Core Python Programming, by Wesley Chun. I am leaning towards Core Python Programming, mainly because it seems to be the more comprehensive one, but I am worried it may be too technical for me, having little programming experience. Any thoughts on those two, or perhaps another book? Thanks for your help! -
I haven't run the python code, but my C++ did calculate it to that... I've since become slightly obsessed with prime numbers, LOL, joined GIMPS, been reading books on them.Leave a comment:
-
Two (or more) computers sharing workload
I've been fooling around with large numbers for a little while, and seeing how slow my laptop is calculating prime numbers above 10^8, have been wishing I had a dedicated machine to crunch numbers... If I have the concept somewhat right, supercomputers essentially are clusters of CPUs on purpose-made motherboards all linked together to share workload. Obviously such a machine is out of the question, but I do know that there are dual-processor motherbaords... -
Data types for extraordinarily large or long numbers, eg 10^1000000 or pi
This question is probably to complex to be answered quickly, but if you could even point me in the right direction that would be great! I am interested in knowing how to work with extremely large numbers, say like trying to find primes in excess of a million digits, or calculating pi to the billions of decimal places. Obviously even unsigned __int64 would be insufficient to process this (Never mind that I could not afford a computer capable of... -
Much more efficient than mine, LOL.... It took me somwhere between 5-10 minutes (i wasn't counting) to calculate that the first prime after 10^15... which is 1,000,000,000,0 00,037Leave a comment:
-
Done, used a while loop over the code formerly covered by the gotos, then put in a break if i == 0. Out of curiosity, what is wrong with goto statements?Leave a comment:
-
The first prime number over 1,000,000,000,000?
Anyone want to venture a guess at the first prime number above 1,000,000,000,0 00? I used my program shown in the C++ section to calculate it... you won't win anything if you get it, but I thought it might be fun. Please excuse my enthusiasm about this, but this is the first program I have written mostly on my own, but with some crucial help from people, that did anything even remotely useful and worked! -
Fun with prime numbers!
Thanks to everyone who helped me out with my early version of the prime number calculator... Here is the complete and updated version including unsigned 64 bit integers...mmmm mm....... Lots of fun with the higher numbers, but my humble 1.86 gHz centrino with 1gb RAM slows to a crawl with numbers in excess of a billion or ten.... :-) Here is the complete program, if you want to have some fun with it:
...Code:#include <iostream>
-
Limiting possibilities with string arrays
Hello again! I am still having problems with the code under the title "newbie woes", but I have moved on for now to another exercise. The book has asked me to write a program that will use two string arrays to select a toy out of a bag, a ball or cube in 1 of four colours. There should also only be one ball and cube for each colour, which is that part I am having problems with. Also, I am not very clear on how this code works, I will... -
Silly me, that error was from having the file running while trying to compile, but now I am getting a display of numbers, mostly sequential, but every so often it skips one. Most of the numbers are certainly NOT prime... where have I gone wrong?Leave a comment:
-
Thanks Horace, I'm getting closer... what I'm trying to do specifically is not just to determine if a number is prime or not, but to actually print onscreen all the prime numbers between 1 and knum, so if knum is 10, then I want to print onscreen "1 3 5 7"... Here is my revised code:
#include <iostream>
#include <math.h>
using namespace std;
int knum;
int i = 2;
...Leave a comment:
-
I'm trying to calculate all the prime numbers between 1 and knum.... BTW, thanks for point out initializing i = 0, i changed it to i = 1, and it doesn't crash, which is excellent, but now when I entered 100 as knum, it prints "3 6 7 8 9" and then closes... I'm probably trying to do this completely the wrong way...!Leave a comment:
-
newbie woes: 21 line C++ code crashes
Hi there! I'm brand new to programming, save for some adventuring with BASIC 10 years ago. I have been learning from "C++ Without Fear" by Brian Overland, and it is really well written, but I still have dificulty grasping many concepts. I am trying to write code that will take an input number, then print all the prime numbers between 1 and that number. At this point, the code compiles in Dev C++ without problem, but after inputting the...
No activity results to display
Show More
Leave a comment: