• Learning Java - Ideas for shit I can make?
    13 replies, posted
So, yeah. I've been learning Java from the Stanford Engineering Everywhere course, but some of the assignments are fucking with my head a little bit (example: I had to create six rows of evenly spaced blocks of different colors centred near the top of the screen. Can't do it. I'm not great at problem solving). To give you an idea of how far along I am, here's the last lecture I watched: [media]http://www.youtube.com/watch?v=YpZCKVG4s5k[/media] Do any of you guys have ideas for programs I could write that will challenge me and help me learn? Thanks.
[url]http://java.sun.com/docs/books/tutorial/java/[/url] [editline]06:56AM[/editline] Google can help you find stuff too: [url]http://www.cafeaulait.org/books/jdr/exercises/[/url] [url]http://leepoint.net/notes-java/index.html[/url]
To really help you with logic and problem solving: [url]http://www.javabat.com[/url] Use the API if you need to figure out some new commands: [url]http://java.sun.com/javase/6/docs/api/[/url]
Make some sorta prime number gen'. Thats how I always start off in applications
Try [url]http://projecteuler.net[/url] if you haven't yet.
[QUOTE=HeroicPillow;21002195]To really help you with logic and problem solving: [URL]http://www.javabat.com[/URL] Use the API if you need to figure out some new commands: [URL]http://java.sun.com/j2se/1.5.0/docs/api/[/URL][/QUOTE] Why not use the Java 6 API? [url]http://java.sun.com/javase/6/docs/api/[/url]
[URL]http://projecteuler.net/[/URL] Shit, I was late... These are fun... But challenging... Very challenging
thanks bros
[QUOTE=Loli;21060496][URL]http://projecteuler.net/[/URL] Shit, I was late... These are fun... But challenging... Very challenging[/QUOTE] The first ones are pretty easy IIRC. Later on however, yes. It gets harder and harder to do any question with relative efficiency without a deep math background. I got 56 or so done in Grade 11 without too much difficulty. Even did some of the hard ones (<3k people completed).
[QUOTE=gilly_54;21058865]Try [url]http://projecteuler.net[/url] if you haven't yet.[/QUOTE] Awesome, I was looking for something like this myself, thanks.
[QUOTE=PvtCupcakes;21060202]Why not use the Java 6 API? [url]http://java.sun.com/javase/6/docs/api/[/url][/QUOTE] Heh, I haven't done anything with java for over a year now, and haven't exactly been following the language too closely. I just google searched "Java api" and took the first link. When I saw 5.0, I remember that's what I used when I was programming and just plopped it into my post. I'll change the link in my post to Java 6. ;D Edit: Ha, my laptop's battery died right after I posted this. And apparently I linked the 1.5 API in my original post, crazy.
[QUOTE=gilly_54;21058865]Try [url]http://projecteuler.net[/url] if you haven't yet.[/QUOTE] my god i'm stuck on problem two :byodood:
You should really be creative and experiment and as you learn new things your mind will keep rolling on going hmm, what about if I do this.... that usually gets you a few good ideas.
[QUOTE=tanthreecle;21160966]my god i'm stuck on problem two :byodood:[/QUOTE] [code] a, b = 0, 1 # initialize a and b Fibi = [] # initialize fibi as a list while b < 4000001: # while b doesn't exceed 4,000,000 Fibi.append(b) # add b to the list print b a, b = b, a + b # set a as b and b as a + b sums = 0 # initalize sums for c in Fibi: # for value c in Fibi if c % 2 == 0: # if c modulo 2 is 0 ... sums += c # add c to sums print c else: # otherwise... pass # pass. print sums [/code] That's in Python, but pretty sure that's what they wanted. It also prints all the steps but the last number printed is it. Basically, just follow my comments and try to do something similar in java. [editline]04:13PM[/editline] yeah, it got me the right answer.
Sorry, you need to Log In to post a reply to this thread.