• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 16:02
CEST 22:02
KST 05:02
  • Home
  • Forum
  • Calendar
  • Streams
  • Liquipedia
  • Features
  • Store
  • EPT
  • TL+
  • StarCraft 2
  • Brood War
  • Smash
  • Heroes
  • Counter-Strike
  • Overwatch
  • Liquibet
  • Fantasy StarCraft
  • TLPD
  • StarCraft 2
  • Brood War
  • Blogs
Forum Sidebar
Events/Features
News
Featured News
[ASL21] Ro16 Preview Pt2: All Star10Team Liquid Map Contest #22 - The Finalists16[ASL21] Ro16 Preview Pt1: Fresh Flow9[ASL21] Ro24 Preview Pt2: News Flash10[ASL21] Ro24 Preview Pt1: New Chaos0
Community News
2026 GSL Season 1 Qualifiers19Maestros of the Game 2 announced92026 GSL Tour plans announced15Weekly Cups (April 6-12): herO doubles, "Villains" prevail1MaNa leaves Team Liquid25
StarCraft 2
General
MaNa leaves Team Liquid Maestros of the Game 2 announced 2026 GSL Tour plans announced Team Liquid Map Contest #22 - The Finalists Blizzard Classic Cup @ BlizzCon 2026 - $100k prize pool
Tourneys
2026 GSL Season 1 Qualifiers INu's Battles#14 <BO.9 2Matches> Sparkling Tuna Cup - Weekly Open Tournament GSL CK: More events planned pending crowdfunding RSL Revival: Season 5 - Qualifiers and Main Event
Strategy
Custom Maps
[D]RTS in all its shapes and glory <3 [A] Nemrods 1/4 players [M] (2) Frigid Storage
External Content
Mutation # 522 Flip My Base The PondCast: SC2 News & Results Mutation # 521 Memorable Boss Mutation # 520 Moving Fees
Brood War
General
Leta's ASL S21 Ro.16 review BW General Discussion ASL21 General Discussion BGH Auto Balance -> http://bghmmr.eu/ Data needed
Tourneys
[Megathread] Daily Proleagues Escore Tournament StarCraft Season 2 [ASL21] Ro16 Group C [ASL21] Ro16 Group D
Strategy
Simple Questions, Simple Answers What's the deal with APM & what's its true value Any training maps people recommend? Fighting Spirit mining rates
Other Games
General Games
Nintendo Switch Thread Dawn of War IV Diablo IV Total Annihilation Server - TAForever Starcraft Tabletop Miniature Game
Dota 2
The Story of Wings Gaming
League of Legends
G2 just beat GenG in First stand
Heroes of the Storm
Simple Questions, Simple Answers Heroes of the Storm 2.0
Hearthstone
Deck construction bug Heroes of StarCraft mini-set
TL Mafia
Vanilla Mini Mafia Mafia Game Mode Feedback/Ideas TL Mafia Community Thread Five o'clock TL Mafia
Community
General
US Politics Mega-thread Canadian Politics Mega-thread Things Aren’t Peaceful in Palestine Russo-Ukrainian War Thread YouTube Thread
Fan Clubs
The IdrA Fan Club
Media & Entertainment
[Manga] One Piece Anime Discussion Thread [Req][Books] Good Fantasy/SciFi books Movie Discussion!
Sports
2024 - 2026 Football Thread Formula 1 Discussion McBoner: A hockey love story Cricket [SPORT]
World Cup 2022
Tech Support
Strange computer issues (software) [G] How to Block Livestream Ads
TL Community
The Automated Ban List
Blogs
Sexual Health Of Gamers
TrAiDoS
lurker extra damage testi…
StaticNine
Broowar part 2
qwaykee
Funny Nicknames
LUCKY_NOOB
Iranian anarchists: organize…
XenOsky
Customize Sidebar...

Website Feedback

Closed Threads



Active: 1827 users

The Big Programming Thread - Page 66

Forum Index > General Forum
Post a Reply
Prev 1 64 65 66 67 68 1032 Next
Thread Rules
1. This is not a "do my homework for me" thread. If you have specific questions, ask, but don't post an assignment or homework problem and expect an exact solution.
2. No recruiting for your cockamamie projects (you won't replace facebook with 3 dudes you found on the internet and $20)
3. If you can't articulate why a language is bad, don't start slinging shit about it. Just remember that nothing is worse than making CSS IE6 compatible.
4. Use [code] tags to format code blocks.
loiop
Profile Joined March 2011
34 Posts
July 10 2011 21:22 GMT
#1301
everyone's talking about c++ c# and java and whatnot may i hear some opinions about python?

I just recently started programming on my own and I picked up python for my first programming language. I just finished my first pdf140~ pages and started second one. I know the "basics" of python. Now after that i've written some programs (text based only) also i've found two webpages for problems http://projecteuler.net and http://www.pythonchallenge.com/ so I have alot of learning and programming to do if i choose so but also i'm wondering how useful python is and when should I pick another language? I'm not trying to become a professional programmer/developer but i would like to keep that open aswell if I stick to my new hobby also i'm wondering the differences of python 2.x and python 3.x. I naturally picked up the newest version of python and started learning it but now i have a problem already. I can't find library for image manipulation for python 3. useful info about python 2 and 3 for beginner would be also appreciated.
japro
Profile Joined August 2010
172 Posts
July 10 2011 21:34 GMT
#1302
On July 11 2011 06:22 loiop wrote:
but also i'm wondering how useful python is and when should I pick another language?

Being a good programmer isn't that much a question of knowing the right or many languages. If you learn a reasonable modern language (like python) and get good at that you can pick up most other languages in reasonable time. I'd say just focus on becoming a good programmer (know your way around OOP/patterns/algorithms/clean coding) and pick up other languages when the need arises.
Siniyas
Profile Joined January 2011
Germany66 Posts
July 10 2011 21:39 GMT
#1303
On July 11 2011 06:20 AkaHenchway wrote:
Show nested quote +
On July 11 2011 06:01 tec27 wrote:
On July 11 2011 04:16 AkaHenchway wrote:
Hey guys having some trouble again (Java). I have looked aroud for some help but every explanation im given is way above my head.....write a program taht prompts the user to enter the number of students and each students name and score, and finally displays the name of the student with the highest score is what I am supposed to be doing.
+ Show Spoiler +

import java.util.Scanner;

public class highscore{

public static void main(String[] args){

Scanner input = new Scanner(System.in);

int i = 0;

System.out.print("How many student's are there? ");

int count = input.nextInt();

do{

if (i > count)

break;



System.out.print("Students name: ");

String n = input.nextLine();

System.out.print("Student Score: ");

int score = input.nextInt();

i++;}



while (i != 0);

System.out.println("No students left");


}

}



Basically I am unsure of how to put my 2 questions that I want to continuously ask over and over again into a loop. As it currently sits it rune/displays but has both quesitons I want to ask on the same line....Also unsure of how I will save the names inputted by the user as well as their scores since I will be recalling names and numbers further in the program.....I was suggested to create a student class and create a student object inside my loop, but frankly I need it explained out a little better.

You're trying to overcomplicate what you have to do here. They want you to take in students' names and their respective scores, and return the max score. You're trying to take in students' names and respective scores, store all of those in memory, then iterate over them and return the highest score. This middle part is a huge waste of memory and execution time for this task, since you're already iterating over the names (essentially) when they are input.

So instead of trying to store all of the names and scores, just simply store the highest one. Whenever you input a new score, check it against your stored score. If its higher, store the new score and name. If its not, leave the old one. When you get to the end of your inputting phase, you'll have the highest score stored already and can simply print out the name and score.


Yea just realized that not to long ago, here is where I am at so far, still struggling but getting there.
+ Show Spoiler +
import java.util.Scanner;

public class highscore{

public static void main(String[] args){

Scanner input = new Scanner(System.in);


int i = 0;

int hiscore;

string hiscorename;

System.out.print("How many student's are there? ");

int count = input.nextInt();

for(int i = 0; i < count; i++){

System.out.println("Students name: ");

string n = input.nextLine();

System.out.println("");

System.out.println("Student Score: ");

int score = input.nextInt();}

if (score > 0){

score = hiscore;

System.out.println(n + " has the highest score with " + hiscore);}

if (score > hiscore){

score = hiscore;

System.out.println(n + " has the highest score with " + hiscore);}

else if (hiscore > score);






while (i > count);

System.out.println("No students left");






This looks really messed up. Try to write code that does this. Have 4 variables. 2 Of them are the onese you get the input in. The other two are your highest score onces. Set those to a default value beforehand. Now write a for loop. In this for loop read in the students name and score. Compare it to the highscore. If its worse do nothing, if its better put the new values into it. After the for loop you have your two variables with name and highestscore. Now just make a nice text output for them.

Your code right now looks like a lot of patchwork. Define all the variables you need at the top. Also } into its own row and indent every {} block if your editor doesnt.
Let it rip
tec27
Profile Blog Joined June 2004
United States3702 Posts
July 10 2011 21:39 GMT
#1304
On July 11 2011 06:20 AkaHenchway wrote:
Show nested quote +
On July 11 2011 06:01 tec27 wrote:
On July 11 2011 04:16 AkaHenchway wrote:
Hey guys having some trouble again (Java). I have looked aroud for some help but every explanation im given is way above my head.....write a program taht prompts the user to enter the number of students and each students name and score, and finally displays the name of the student with the highest score is what I am supposed to be doing.
+ Show Spoiler +

import java.util.Scanner;

public class highscore{

public static void main(String[] args){

Scanner input = new Scanner(System.in);

int i = 0;

System.out.print("How many student's are there? ");

int count = input.nextInt();

do{

if (i > count)

break;



System.out.print("Students name: ");

String n = input.nextLine();

System.out.print("Student Score: ");

int score = input.nextInt();

i++;}



while (i != 0);

System.out.println("No students left");


}

}



Basically I am unsure of how to put my 2 questions that I want to continuously ask over and over again into a loop. As it currently sits it rune/displays but has both quesitons I want to ask on the same line....Also unsure of how I will save the names inputted by the user as well as their scores since I will be recalling names and numbers further in the program.....I was suggested to create a student class and create a student object inside my loop, but frankly I need it explained out a little better.

You're trying to overcomplicate what you have to do here. They want you to take in students' names and their respective scores, and return the max score. You're trying to take in students' names and respective scores, store all of those in memory, then iterate over them and return the highest score. This middle part is a huge waste of memory and execution time for this task, since you're already iterating over the names (essentially) when they are input.

So instead of trying to store all of the names and scores, just simply store the highest one. Whenever you input a new score, check it against your stored score. If its higher, store the new score and name. If its not, leave the old one. When you get to the end of your inputting phase, you'll have the highest score stored already and can simply print out the name and score.


Yea just realized that not to long ago, here is where I am at so far, still struggling but getting there.
+ Show Spoiler +


import java.util.Scanner;
public class highscore{

public static void main(String[] args){

Scanner input = new Scanner(System.in);


int i = 0;

int hiscore;

string hiscorename;

System.out.print("How many student's are there? ");

int count = input.nextInt();

for(int i = 0; i < count; i++){

System.out.println("Students name: ");

string n = input.nextLine();

System.out.println("");

System.out.println("Student Score: ");

int score = input.nextInt();}

if (score > 0){

score = hiscore;

System.out.println(n + " has the highest score with " + hiscore);}

if (score > hiscore){

score = hiscore;

System.out.println(n + " has the highest score with " + hiscore);}

else if (hiscore > score);






while (i > count);

System.out.println("No students left");






In the future try to paste your code into pastebin or at least put it in code tags here, its a real pain to read it otherwise. Also, you need to format your code better in general, your placement of curly braces and things like that leaves a lot to be desired. I went ahead and ran your code through a beautifier to correct that stuff and put it on pastebin, this is pretty much how it should be formatted: http://pastebin.com/cVHaqWnJ

Now, onto fixing your code. You need to understand variable scoping. In its simplest form, this basically means that if you declare a variable inside a set of curly braces, it only exist inside of those. As an example of a scoping problem in your code, you declare the variable score inside your for loop, then try to use it outside of the for loop. You cannot do this, because score does not exist outside of the loop (and in fact only exists for each individual iteration of the loop). Your if statements outside of the loop make no sense anyway, because they are obviously meant to check each individual score against the high score, and you only have access to each individual score during the iterations of the loop.

Sit down and walk through your code by hand for each of the different cases that could happen and see if its execution actually makes sense (For instance, walk through it for the first name being entered, then walk through it for a case where a lower score was entered, then a higher score, etc.). Your code right now doesn't really make sense logically, so it shouldn't take you long to identify the problem areas.
Can you jam with the console cowboys in cyberspace?
catamorphist
Profile Joined May 2010
United States297 Posts
Last Edited: 2011-07-10 22:09:48
July 10 2011 22:05 GMT
#1305
On July 11 2011 06:22 loiop wrote:
everyone's talking about c++ c# and java and whatnot may i hear some opinions about python?

I just recently started programming on my own and I picked up python for my first programming language. I just finished my first pdf140~ pages and started second one. I know the "basics" of python. Now after that i've written some programs (text based only) also i've found two webpages for problems http://projecteuler.net and http://www.pythonchallenge.com/ so I have alot of learning and programming to do if i choose so but also i'm wondering how useful python is and when should I pick another language? I'm not trying to become a professional programmer/developer but i would like to keep that open aswell if I stick to my new hobby also i'm wondering the differences of python 2.x and python 3.x. I naturally picked up the newest version of python and started learning it but now i have a problem already. I can't find library for image manipulation for python 3. useful info about python 2 and 3 for beginner would be also appreciated.


If I had to name a language based on how useful it is, Python would pretty much be at the top of the list; it would definitely be above C# or Java. It's a fairly good language, it's very popular, and people use it for almost any sort of thing you can think of. I don't see any reason to bother about learning another language until you consider yourself fairly proficient with Python.

It's important to learn a single language well. There's not much point in dabbling unless you are an expert in something first, because the skills and knowledge you earn en route to your expertise are the tools you need to evaluate alternatives.

What do you guys think, is doing informatics (programming I guess) as a minor enough to become decent at programming or does that take a lot of additional extracurricular work? It'd be 60 ECTS points for the bachelor and another 30 for the master.


Doing something in school has little correlation with becoming decent at programming. Seventy percent of people majoring in CS are incompetent at programming. The act of working on software projects with the intent to learn and do a good job is both necessary and sufficient to become decent at programming.
http://us.battle.net/sc2/en/profile/281144/1/catamorphist/
AkaHenchway
Profile Joined October 2010
United States41 Posts
July 10 2011 22:09 GMT
#1306
haha is it bad that ive been stuck on this assignment for like 4 hours ? Well how do you go about storing and comparing the first number I get out of my loop? Do I just set like hiscore = 0 then compare and start from there?
Fuck the Bullshit
AkaHenchway
Profile Joined October 2010
United States41 Posts
July 10 2011 22:13 GMT
#1307
and my other question was you said that in each iteration fo the loop is when the numbers exist so I should be putting my if statement within the loop?
Fuck the Bullshit
Siniyas
Profile Joined January 2011
Germany66 Posts
Last Edited: 2011-07-10 22:19:27
July 10 2011 22:18 GMT
#1308
On July 11 2011 07:13 AkaHenchway wrote:
and my other question was you said that in each iteration fo the loop is when the numbers exist so I should be putting my if statement within the loop?


for ....
{

if(score>highscore)
{
highscore=score;
}
}

Each iteration of the for loop you get new numbers, so you need to compare them each time.
Let it rip
Bortlett
Profile Joined October 2010
United States302 Posts
July 10 2011 22:18 GMT
#1309
On July 11 2011 06:22 loiop wrote:
everyone's talking about c++ c# and java and whatnot may i hear some opinions about python?

I just recently started programming on my own and I picked up python for my first programming language. I just finished my first pdf140~ pages and started second one. I know the "basics" of python. Now after that i've written some programs (text based only) also i've found two webpages for problems http://projecteuler.net and http://www.pythonchallenge.com/ so I have alot of learning and programming to do if i choose so but also i'm wondering how useful python is and when should I pick another language? I'm not trying to become a professional programmer/developer but i would like to keep that open aswell if I stick to my new hobby also i'm wondering the differences of python 2.x and python 3.x. I naturally picked up the newest version of python and started learning it but now i have a problem already. I can't find library for image manipulation for python 3. useful info about python 2 and 3 for beginner would be also appreciated.


It is generally good to know a dynamic language like python and a statically compiled language like C/C++. They each are used to solve every different problems and you will not be able to jump into a C++ application easily just from learning python. C/C++ requires it's own time investment. There is another family of languages called functional languages (Lisp/Scheme/F#), but they tend to be more academic in nature.

Once you know one of each though you'll be able to jump around very easily.
EvanED
Profile Joined October 2009
United States111 Posts
July 10 2011 22:34 GMT
#1310
On July 11 2011 06:22 loiop wrote:
everyone's talking about c++ c# and java and whatnot may i hear some opinions about python?

Python is pretty good. Python 3 is a bit better in that it makes some elements more uniform and removes some behavior that can lead to latent bugs (Python 2 is a little weakly typed IMO; e.g. 1 < 'hello' is legal in Python 2 but not in 3).

The main problem, as you've discovered, is Python 2 has a very large number of libraries that haven't been ported yet. Python 2 is still probably more widely deployed too.

If you feel like you know Python pretty well, or your ultimate goals don't align well with Python for some reason, you could look at something else. But it does sound like Python would be good for you.

On July 11 2011 06:34 japro wrote:
Show nested quote +
On July 11 2011 06:22 loiop wrote:
but also i'm wondering how useful python is and when should I pick another language?

Being a good programmer isn't that much a question of knowing the right or many languages. If you learn a reasonable modern language (like python) and get good at that you can pick up most other languages in reasonable time. I'd say just focus on becoming a good programmer (know your way around OOP/patterns/algorithms/clean coding) and pick up other languages when the need arises.

OTOH, it definitely helps to know some different styles -- dynamically-typed scripting, traditional C-like, functional, etc.
catamorphist
Profile Joined May 2010
United States297 Posts
Last Edited: 2011-07-11 00:58:40
July 11 2011 00:50 GMT
#1311
On July 11 2011 07:34 EvanED wrote:
OTOH, it definitely helps to know some different styles -- dynamically-typed scripting, traditional C-like, functional, etc.


I think if you harbor a long-term interest in programming or CS, then yeah, it helps to learn different languages so that you can absorb different styles.

But I absolutely don't think that someone who has spent less than a year or two programming is getting anything out of bunny-hopping around learning multiple languages, especially if we're talking about learning languages that are 75% similar, like C++, C#, and Java (and Python isn't too far off.) If you're learning a language for six months and doing one or two little projects in it, and then learning a different language, the end result is knowing 0 different styles.
http://us.battle.net/sc2/en/profile/281144/1/catamorphist/
Kfish
Profile Blog Joined May 2010
Chile282 Posts
July 11 2011 01:24 GMT
#1312
Anyone recommend some good online C# tutorials? I'm a programming novice, just had one semester in basic java (introduction to programming) where we just tried to learn the logic for resolving problems.


Thanks in advance
EvanED
Profile Joined October 2009
United States111 Posts
July 11 2011 01:45 GMT
#1313
On July 11 2011 09:50 catamorphist wrote:
Show nested quote +
On July 11 2011 07:34 EvanED wrote:
OTOH, it definitely helps to know some different styles -- dynamically-typed scripting, traditional C-like, functional, etc.


I think if you harbor a long-term interest in programming or CS, then yeah, it helps to learn different languages so that you can absorb different styles.

But I absolutely don't think that someone who has spent less than a year or two programming is getting anything out of bunny-hopping around learning multiple languages, especially if we're talking about learning languages that are 75% similar, like C++, C#, and Java (and Python isn't too far off.) If you're learning a language for six months and doing one or two little projects in it, and then learning a different language, the end result is knowing 0 different styles.

I do agree with this, and apologize if anyone got the wrong idea. (E.g., that's why I recommended against C# for RedJustice, who knows some Java and wants as an ultimate goal to learn C++.) If you want to start with Python that's a very good choice for a first language IMO, but wait until you are reasonably comfortable before you move on. (At least unless some additional specific goal comes up where a different language would be a clear better choice.)

That said, I do disagree with where you put Python; I think there are a lot of very important differences between it and Java/C#/C++. (Especially Java and C++.) If you asked me whether I thought Python was closer to Java or to Scheme, I'd probably eventually come around to Java, but it would be far from an easy decision. If you stick something like TinyCLOS (/SRFI 20) onto Scheme, that would probably be enough to change my answer.
catamorphist
Profile Joined May 2010
United States297 Posts
Last Edited: 2011-07-11 02:03:52
July 11 2011 02:00 GMT
#1314
On July 11 2011 10:45 EvanED wrote:
Show nested quote +
On July 11 2011 09:50 catamorphist wrote:
On July 11 2011 07:34 EvanED wrote:
OTOH, it definitely helps to know some different styles -- dynamically-typed scripting, traditional C-like, functional, etc.


I think if you harbor a long-term interest in programming or CS, then yeah, it helps to learn different languages so that you can absorb different styles.

But I absolutely don't think that someone who has spent less than a year or two programming is getting anything out of bunny-hopping around learning multiple languages, especially if we're talking about learning languages that are 75% similar, like C++, C#, and Java (and Python isn't too far off.) If you're learning a language for six months and doing one or two little projects in it, and then learning a different language, the end result is knowing 0 different styles.

I do agree with this, and apologize if anyone got the wrong idea. (E.g., that's why I recommended against C# for RedJustice, who knows some Java and wants as an ultimate goal to learn C++.) If you want to start with Python that's a very good choice for a first language IMO, but wait until you are reasonably comfortable before you move on. (At least unless some additional specific goal comes up where a different language would be a clear better choice.)

That said, I do disagree with where you put Python; I think there are a lot of very important differences between it and Java/C#/C++. (Especially Java and C++.) If you asked me whether I thought Python was closer to Java or to Scheme, I'd probably eventually come around to Java, but it would be far from an easy decision. If you stick something like TinyCLOS (/SRFI 20) onto Scheme, that would probably be enough to change my answer.


Well, I don't use Python regularly so I'm not really qualified. I know that Python started out with half-assed support for a functional style (e.g. no lambdas --> crippled lambdas, no tail recursion guarantee, built-in data structures are all mutable) which has since been rectified a little bit. But I do know that there's not a big culture of functional programming in Python; most people's Python code that I've seen has been written in basically a procedural style, kind of like C or Java but with a ton of thankful amenities and sugars like list comprehensions, garbage collection and dynamic typing. Nobody's Racket code looks like that.

So I suspect that someone learning Python may very well stay in C territory rather than Scheme territory, because C territory seems to be where people naturally gravitate unless they are of a mathematical bent or unless they are taught well.
http://us.battle.net/sc2/en/profile/281144/1/catamorphist/
AndyG
Profile Joined July 2010
United States22 Posts
July 11 2011 02:10 GMT
#1315
Man, the computer science GRE subject test is grueling. Everything I've ever seen is popping up to study for this, plus stuff I've never seen. This isn't strictly programming, it's mostly theory with some pseudocode problems, but damn. I'm going for my Ph.D in computer science as of next fall.

To keep this post I only put up to vent semi-relevant, I'm currently an undergraduate researching an information retrieval technique called Latent Semantic Indexing (using the Singular Value Decomposition of a term-document matrix.) I've implemented the method and am having to work with my own sparse matrix types, as the term-document matrix for the main dataset I'm working with would be about 64 gigabytes if stored in a dense format! I've been working in this field for over a year, so if anybody has any questions about linear algebra on gigantic datasets, I'm all ears ^_^
EvanED
Profile Joined October 2009
United States111 Posts
Last Edited: 2011-07-11 02:48:55
July 11 2011 02:47 GMT
#1316
On July 11 2011 11:00 catamorphist wrote:Well, I don't use Python regularly so I'm not really qualified. I know that Python started out with half-assed support for a functional style (e.g. no lambdas --> crippled lambdas, no tail recursion guarantee, built-in data structures are all mutable) which has since been rectified a little bit.

Unless it was changed in Python 3, the lambdas are still crippled. However, it has "always" (at least for a long time) supported closures and functions as first-class objects. (Even classes are first-class objects.) Those are traditionally distinctly characteristics of functional languages. Generators and list comprehensions also have a distinctly functional flavor to them as well.

Tail recursion guarantees I think are overrrated. Yes, they're important, but they're not that important. (Take Clojure for instance: no tail recursion. Some of that's the JVM's fault, but some is a deliberate design decision to not support it even when they could so as to make whether or not it's actually done explicit.)

And yes, the built-in data structures are all mutable, but that's true in Scheme too (before R6RS anyway).

But I do know that there's not a big culture of functional programming in Python; most people's Python code that I've seen has been written in basically a procedural style, kind of like C or Java but with a ton of thankful amenities and sugars like list comprehensions, garbage collection and dynamic typing. Nobody's Racket code looks like that.

This, though, is definitely true, and is the primary reason that I would side with saying it's closer to Java. But if you look at the actual language.. I dunno.

On July 11 2011 11:10 AndyG wrote:
Man, the computer science GRE subject test is grueling. Everything I've ever seen is popping up to study for this, plus stuff I've never seen. This isn't strictly programming, it's mostly theory with some pseudocode problems, but damn. I'm going for my Ph.D in computer science as of next fall.

I think that's true of most people who take it. It would be very difficult to have a background in everything that shows up.
AkaHenchway
Profile Joined October 2010
United States41 Posts
July 11 2011 03:19 GMT
#1317
http://pastebin.com/Cgrsje60

Doing class assignment which is basically follow what book says to do (This is in microsoft access 2010 SQL)....Question is how do i Execute the query?
Fuck the Bullshit
tofucake
Profile Blog Joined October 2009
Hyrule19205 Posts
July 11 2011 03:27 GMT
#1318
On July 11 2011 06:22 loiop wrote:
everyone's talking about c++ c# and java and whatnot may i hear some opinions about python?

I just recently started programming on my own and I picked up python for my first programming language. I just finished my first pdf140~ pages and started second one. I know the "basics" of python. Now after that i've written some programs (text based only) also i've found two webpages for problems http://projecteuler.net and http://www.pythonchallenge.com/ so I have alot of learning and programming to do if i choose so but also i'm wondering how useful python is and when should I pick another language? I'm not trying to become a professional programmer/developer but i would like to keep that open aswell if I stick to my new hobby also i'm wondering the differences of python 2.x and python 3.x. I naturally picked up the newest version of python and started learning it but now i have a problem already. I can't find library for image manipulation for python 3. useful info about python 2 and 3 for beginner would be also appreciated.

I'm opposed to Python on the simple fact that I do not want tabbing to be part of the lexicon.
Liquipediaasante sana squash banana
tofucake
Profile Blog Joined October 2009
Hyrule19205 Posts
July 11 2011 03:30 GMT
#1319
On July 11 2011 06:20 AkaHenchway wrote:
Show nested quote +
On July 11 2011 06:01 tec27 wrote:
On July 11 2011 04:16 AkaHenchway wrote:
Hey guys having some trouble again (Java). I have looked aroud for some help but every explanation im given is way above my head.....write a program taht prompts the user to enter the number of students and each students name and score, and finally displays the name of the student with the highest score is what I am supposed to be doing.
+ Show Spoiler +

import java.util.Scanner;

public class highscore{

public static void main(String[] args){

Scanner input = new Scanner(System.in);

int i = 0;

System.out.print("How many student's are there? ");

int count = input.nextInt();

do{

if (i > count)

break;



System.out.print("Students name: ");

String n = input.nextLine();

System.out.print("Student Score: ");

int score = input.nextInt();

i++;}



while (i != 0);

System.out.println("No students left");


}

}



Basically I am unsure of how to put my 2 questions that I want to continuously ask over and over again into a loop. As it currently sits it rune/displays but has both quesitons I want to ask on the same line....Also unsure of how I will save the names inputted by the user as well as their scores since I will be recalling names and numbers further in the program.....I was suggested to create a student class and create a student object inside my loop, but frankly I need it explained out a little better.

You're trying to overcomplicate what you have to do here. They want you to take in students' names and their respective scores, and return the max score. You're trying to take in students' names and respective scores, store all of those in memory, then iterate over them and return the highest score. This middle part is a huge waste of memory and execution time for this task, since you're already iterating over the names (essentially) when they are input.

So instead of trying to store all of the names and scores, just simply store the highest one. Whenever you input a new score, check it against your stored score. If its higher, store the new score and name. If its not, leave the old one. When you get to the end of your inputting phase, you'll have the highest score stored already and can simply print out the name and score.


Yea just realized that not to long ago, here is where I am at so far, still struggling but getting there.
+ Show Spoiler +
import java.util.Scanner;

public class highscore{

public static void main(String[] args){

Scanner input = new Scanner(System.in);


int i = 0;

int hiscore;

string hiscorename;

System.out.print("How many student's are there? ");

int count = input.nextInt();

for(int i = 0; i < count; i++){

System.out.println("Students name: ");

string n = input.nextLine();

System.out.println("");

System.out.println("Student Score: ");

int score = input.nextInt();}

if (score > 0){

score = hiscore;

System.out.println(n + " has the highest score with " + hiscore);}

if (score > hiscore){

score = hiscore;

System.out.println(n + " has the highest score with " + hiscore);}

else if (hiscore > score);






while (i > count);

System.out.println("No students left");




You have an infinite loop. In addition to some other problems, many of which would be clearly evident with a more sane code style.
Liquipediaasante sana squash banana
EvanED
Profile Joined October 2009
United States111 Posts
July 11 2011 03:33 GMT
#1320
On July 11 2011 12:27 tofucake wrote:
I'm opposed to Python on the simple fact that I do not want tabbing to be part of the lexicon.

I've come to dislike that particular choice (at least in it's specifics), but IMO disqualifying a language because of one thing that you view as a poor design choice seems really silly. I could list 10 objections to any language I've ever used that I would view as much worse offenses. To concentrate on that particular issue ignores everything they did right, which with the tool and library support that's out there for it makes Python among very few peers if you want a language for lightweight to moderate programming. It's not alone in that area, but there are not many others that I would put on par.
Prev 1 64 65 66 67 68 1032 Next
Please log in or register to reply.
Live Events Refresh
BSL
19:00
RO16 TieBreaker - Group A
ZZZero.O202
LiquipediaDiscussion
Ladder Legends
15:00
Valedictorian Cup #1
Solar vs Cham
SteadfastSC362
Liquipedia
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
SteadfastSC 362
ProTech140
UpATreeSC 90
JuggernautJason72
ROOTCatZ 69
BRAT_OK 63
Ketroc 42
CosmosSc2 32
StarCraft: Brood War
ZZZero.O 202
firebathero 139
Dewaltoss 110
ggaemo 84
Hyun 66
Jaeyun 51
Rock 37
Dota 2
Gorgc7967
monkeys_forever178
League of Legends
Doublelift676
Counter-Strike
byalli1109
minikerr28
Super Smash Bros
AZ_Axe243
Heroes of the Storm
Khaldor769
Liquid`Hasu500
MindelVK6
Other Games
Grubby4197
FrodaN1112
summit1g846
B2W.Neo576
shahzam301
mouzStarbuck208
KnowMe166
RotterdaM143
Pyrionflax103
ViBE10
Organizations
Dota 2
PGL Dota 2 - Main Stream23475
Other Games
gamesdonequick1167
StarCraft 2
ComeBackTV 644
angryscii 39
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
[ Show 20 non-featured ]
StarCraft 2
• Hupsaiya 72
• Adnapsc2 14
• davetesta12
• IndyKCrew
• sooper7s
• AfreecaTV YouTube
• Migwel
• intothetv
• LaughNgamezSOOP
• Kozan
StarCraft: Brood War
• HerbMon 23
• FirePhoenix4
• STPLYoutube
• ZZZeroYoutube
• BSLYoutube
Dota 2
• WagamamaTV538
League of Legends
• Jankos4408
Other Games
• imaqtpie1248
• Shiphtur228
• tFFMrPink 15
Upcoming Events
Sparkling Tuna Cup
13h 59m
WardiTV Map Contest Tou…
14h 59m
Ladder Legends
18h 59m
BSL
22h 59m
CranKy Ducklings
1d 3h
Replay Cast
1d 12h
Wardi Open
1d 13h
Afreeca Starleague
1d 13h
Soma vs hero
Monday Night Weeklies
1d 19h
Replay Cast
2 days
[ Show More ]
Replay Cast
2 days
Afreeca Starleague
2 days
Leta vs YSC
Replay Cast
4 days
The PondCast
4 days
KCM Race Survival
4 days
Replay Cast
5 days
Replay Cast
5 days
Escore
5 days
Replay Cast
6 days
Replay Cast
6 days
IPSL
6 days
Ret vs Art_Of_Turtle
Radley vs TBD
BSL
6 days
Liquipedia Results

Completed

Escore Tournament S2: W4
RSL Revival: Season 4
NationLESS Cup

Ongoing

BSL Season 22
ASL Season 21
CSL 2026 SPRING (S20)
IPSL Spring 2026
KCM Race Survival 2026 Season 2
StarCraft2 Community Team League 2026 Spring
WardiTV TLMC #16
Nations Cup 2026
IEM Rio 2026
PGL Bucharest 2026
Stake Ranked Episode 1
BLAST Open Spring 2026
ESL Pro League S23 Finals
ESL Pro League S23 Stage 1&2
PGL Cluj-Napoca 2026

Upcoming

Escore Tournament S2: W5
Acropolis #4
BSL 22 Non-Korean Championship
CSLAN 4
Kung Fu Cup 2026 Grand Finals
HSC XXIX
uThermal 2v2 2026 Main Event
Maestros of the Game 2
2026 GSL S2
RSL Revival: Season 5
2026 GSL S1
XSE Pro League 2026
IEM Cologne Major 2026
Stake Ranked Episode 2
CS Asia Championships 2026
IEM Atlanta 2026
Asian Champions League 2026
PGL Astana 2026
BLAST Rivals Spring 2026
TLPD

1. ByuN
2. TY
3. Dark
4. Solar
5. Stats
6. Nerchio
7. sOs
8. soO
9. INnoVation
10. Elazer
1. Rain
2. Flash
3. EffOrt
4. Last
5. Bisu
6. Soulkey
7. Mini
8. Sharp
Sidebar Settings...

Advertising | Privacy Policy | Terms Of Use | Contact Us

Original banner artwork: Jim Warren
The contents of this webpage are copyright © 2026 TLnet. All Rights Reserved.