I need some help creating Hello World programs in several languages which will read input from my keyboard/mouse and print Hello World.
The languages I need help with are:
-Fortran
-C++
-php
-JavaScript
-Python
-Perl
-Flaming Thunder
As an example, I wrote one in C# where a Windows form pops up and has two buttons, one of which displays "Hello World" as a label when clicked, and the other exits the program. That's the kind of thing I need--either a message on mouse click or keyboard input. Nothing too fancy.
I would greatly appreciate help on this.
Need To Create Hello Worlds with Keyboard/Mouse Input
Started by MiG-33 SuperFulcrum, Dec 03 2009 06:04 AM
8 replies to this topic
#1
Posted 03 December 2009 - 06:04 AM
|
|
|
#2
Posted 03 December 2009 - 06:40 AM
Well some of those languages are scripting languages, so you don't actually create the GUI's with them, you use HTML forms as the buttons. Is that what you are stuck on?
Also creating a GUI in C++ is not quite as simple as that either. You would need some API software. Unless you are able to create this in the console with a "Print Hello World - Y/N" option or something!
Is it the actual syntax in each language you are stuck on? Or how best to make the GUIs?
Also creating a GUI in C++ is not quite as simple as that either. You would need some API software. Unless you are able to create this in the console with a "Print Hello World - Y/N" option or something!
Is it the actual syntax in each language you are stuck on? Or how best to make the GUIs?
#3
Posted 03 December 2009 - 07:08 AM
I guess I don't really need GUIs - just some interaction with the keyboard or mouse.
I can print Hello World in all of them--I just need a little more than that.
Not sure if that answers your questions...
I can print Hello World in all of them--I just need a little more than that.
Not sure if that answers your questions...
#4
Posted 03 December 2009 - 08:32 AM
MiG-33 SuperFulcrum said:
I guess I don't really need GUIs - just some interaction with the keyboard or mouse.
I can print Hello World in all of them--I just need a little more than that.
Not sure if that answers your questions...
I can print Hello World in all of them--I just need a little more than that.
Not sure if that answers your questions...
Ok, well if you know the basic syntax in all of them, then start to try and write some conditions around it, and if you get stuck in any of them, post what you have here. :)
Note: For C++ you can evaluate the user input in the console by comparing what they have entered against what you want them to enter (IE Y/N).
Hope this helps you.
#5
Posted 03 December 2009 - 08:57 AM
Ha, that's the problem: I'm pretty much a noob. I know enough Java and C# to do this sort of thing, but I don't have much experience. I can do it in php I bet, but the other I'm stuck on.
I'll get back to you. Thanks.
I'll get back to you. Thanks.
#6
Posted 03 December 2009 - 09:05 AM
For each language:
1) print a question "Do you want me to say hello? (Y/N)"
2) get a response
3) if the response is "Y" or "y", print "hello world."
1) print a question "Do you want me to say hello? (Y/N)"
2) get a response
3) if the response is "Y" or "y", print "hello world."
#7
Posted 03 December 2009 - 09:13 AM
WingedPanther said:
For each language:
1) print a question "Do you want me to say hello? (Y/N)"
2) get a response
3) if the response is "Y" or "y", print "hello world."
1) print a question "Do you want me to say hello? (Y/N)"
2) get a response
3) if the response is "Y" or "y", print "hello world."
That's exactly the pseudo code to use. Then just use simple conditional statements in each language, and to be honest - they are all pretty similar.
#8
Posted 03 December 2009 - 04:55 PM
Ok, if someone could help me with one of those languages, maybe I could do the rest.
How would I make that in Python?
How would I make that in Python?
#9
Posted 07 January 2010 - 05:14 PM
MiG-33 SuperFulcrum said:
I need some help creating Hello World programs in several languages which will read input from my keyboard/mouse and print Hello World.
...
I would greatly appreciate help on this.
...
I would greatly appreciate help on this.
FreeBasic is perfect for this. Nice and simple.
PRINT "Hello world" INPUT "What is your name ? ", YourName$ PRINT PRINT "Hello ";YourName$ SLEEP END
-
Cole manager: You have 95 minutes to take the FCC GROL test.
Student: How many lifelines do we get ?
Student: How many lifelines do we get ?


Sign In
Create Account

Back to top









