Hi, I'm MLB and I would be learning C# had my school not stopped the after school club where it was taught Technically I have a years experience, but I payed NO attention
My main skill is bugfixing, something that I can do with basic knowledge of the language. I don't know how, but I can Also, later this year I will be learning basic HTML.
I would love to learn from you guys so post any code you find interesting or is really basic
Do you want the code for my trollish python "chatbot"?
You know Python*-)? I somewhat know it, I just haven't done it in 2 years because it really can't do much:P. It's a very basic language, good for learning. In fact, it was the first one I learned:).
~l)~/\/~/-\~ The tie between real life and legos is imagination .
Trying to find a graphics class for C++. I wanted graphics.h because it was simple and fit my needs, but apparently it like doesn't exist anymore:P:(. I instead got something got openGL. It's VERY complex, it had a whole wiki just for it's documentation:O:P! I hope I can find out how to work it.
~l)~/\/~/-\~ The tie between real life and legos is imagination .
Do you want the code for my trollish python "chatbot"?
You know Python*-)? I somewhat know it, I just haven't done it in 2 years because it really can't do much:P. It's a very basic language, good for learning. In fact, it was the first one I learned:).
Out of the "real" languages i know, I'm by far the best with Python, probably because it was the first "real" language I learned.
Python can do _tons_ with the right libraries. I mean you can't write low-level hardware drivers with it and stuff, but everything from Google to NASA uses it, and Django is one of the most common server-side website building tools.
Old sci-fi is the best sci-fi! v this is not old sci-fi Maxim 3: An ordnance technician at a dead run outranks everybody. Maxim 24: Any sufficiently advanced technology is indistinguishable from a big gun.
"“Even by the twenty-second century, no way had yet been discovered of keeping elderly and conservative scientists from occupying crucial administrative positions. Indeed, it was doubted if the problem ever would be solved.” ^That, on the other hand, is old sci-fi.
well uhh I did coding in 7th grade and that's all I remember. I do remember loving it so much and advancing into the fields of javascript but then I stopped and I have no reason to start up again.
"May the downtrodden one day rise up and take the place of those that would oppress them."
Here's a program I made to get used to C++ coding again: // Test.cpp : A test program //
#include "stdafx.h" #include <iostream>
int main() { int num; const int n1 = 12, n2 = 51, n3 = 103, n4 = 199, n5 = 261; int nums[] = { n1, n2, n3, n4, n5 }; for (int i = 0; i < sizeof(nums) / sizeof(nums[0]); i++) { std::cout << i + 1 << " " << nums << std::endl; }
std::cout << "A number from the list: "; std::cin >> num; switch (num) { case n1: std::cout << "You chose the first number which is " << n1 << std::endl; break; case n2: std::cout << "You chose the second number which is " << n2 << std::endl; break; case n3: std::cout << "You chose the third number which is " << n3 << std::endl; break; case n4: std::cout << "You chose the fourth number which is " << n4 << std::endl; break; case n5: std::cout << "You chose the fifth number which is " << n5 << std::endl; break; default: std::cout << "The number you entered isn't on the list" << std::endl; } return 0; }
I will explain it now. First of all, all programs MUST have a "main" function. The the code in the curly braces is executed when the program runs. In this program it's the only function, but you can have more. For this program I just used the "int" data type. It is just a number with no decimals that isn't too big. I forget the exact size it can go up to. If you need a bigger integer, you can use "long". So I have num, which is the variable input from the user, of type int. Then I define 5 other int constants. Constants are variables that cannot be changed in the program. I then put them in an array named nums. To define an array you put "[]" after the type and name. You can also put a number in the brackets to define the size of the array. I didn't do this as I put in all the values manually, but if I did, it would be 5. Then I made a for loop that iterates through the array. The code "sizeof(nums) / sizeof(nums[0])" may look complicated, but all it really does is get the size of the array, or 5. Then I print out a 5 number list from the array. Arrays start at 0, which is why I did "+1" on the number, that way the list is "1-5" rather than "0-4". "cout" prints to the console. "endl" creates a new line. I had to do "std::" in front of them because it's an outside class. I could have sworn there was a way to make it so you can do it without that, but I forget what it is and couldn't find it on the internet:P. Then I print a message prompting the user for a number to the console. Then I have "cin" which gets user input. In other words, the user types a number and it gets stored in num. I then do a switch to decide which message to print. The variable in parenthesis after switch is the variable being tested. So for example, if I typed 12 it would do case n1 as n1 is set to 12. It would then go on to print the code after the case up until "break". What break does is exit the switch statement, and in this case, finish the program. If a number that isn't on the list is input, the "default" statement would print instead. I don't need a break after default as it's the last statement of the switch. Switches don't require a default, but it's usually good to do one. The program ends with the line "return 0". Since main has "int" before it, it requires a return of an int to be done at the end of the program. Generally the int returned is 0, I am yet to use another int for any reason. Lastly, all statements in C++ must end in a ";". Also, "#include" imports another class or class library. In this case I used "iostream" which allows for input and output. In other words, you need to import it to use cout and cin. That's about it for this program! If you have any questions about it feel free to ask:).
I know about Assembly Code and Pascal code, but not as much about C++, Java, Python or Visual Basic. I may learn these languages in the future.
I have heard of Pascal. It's even older than C++ as they talk about it in my book which was made in 1991:O! I don't recommend Visual Basic at all, I hated it:P. Python is good if you are just starting, but that's about it. Java and C++ are great languages and I suggest trying them sometime:).
I learnt about Apple's Swift programming language, it is pretty great IMO and I enjoyed using it. Although I may try C++ and Java one day. I will probably start with Python though. (When I have more free time)
You know Python*-)? I somewhat know it, I just haven't done it in 2 years because it really can't do much:P. It's a very basic language, good for learning. In fact, it was the first one I learned:).
Out of the "real" languages i know, I'm by far the best with Python, probably because it was the first "real" language I learned.
Python can do _tons_ with the right libraries. I mean you can't write low-level hardware drivers with it and stuff, but everything from Google to NASA uses it, and Django is one of the most common server-side website building tools.
Not as much as Java or C++.
~l)~/\/~/-\~ The tie between real life and legos is imagination .
well uhh I did coding in 7th grade and that's all I remember. I do remember loving it so much and advancing into the fields of javascript but then I stopped and I have no reason to start up again.
You never had a vision of making something cool with code? Maybe a website or video game?
~l)~/\/~/-\~ The tie between real life and legos is imagination .
Hi, I'm MLB and I would be learning C# had my school not stopped the after school club where it was taught Technically I have a years experience, but I payed NO attention
My main skill is bugfixing, something that I can do with basic knowledge of the language. I don't know how, but I can Also, later this year I will be learning basic HTML.
I would love to learn from you guys so post any code you find interesting or is really basic
That's terrible! Who gets rid of programming classes, programming is the future of the world:O! I don't know HTML, but I heard it was pretty easy to learn quickly. I might learn the basics someday when I'm bored:P. I will post one of my test projects I just made in C++, assuming it fits in a post;).
I don't think it was the teacher running it's problem, more something they had to stop due to a lower budget A lot of funds got cut 'cos the NI government isn't great with money Have you seen the latest news Yeah, HTML is quite easy to learn from what I've seen. I learned a bit of it a few years ago. I think I've seen it, but I would need to examine it
One mod to rule them all and in the darkness ban them - Lord of the Mods "I am the Mod Reborn!" - masterlegobuilders I'm the real boss
Yikes I'm the worst in the world at programming. You can help me in my exams.
Do you take a class? If you are learning one of the languages I know, I will gladly help. When I was in school I literally helped everybody at my table with the work, so I'm used to it:P.
Here's a program I made to get used to C++ coding again: // Test.cpp : A test program //
#include "stdafx.h" #include <iostream>
int main() { int num; const int n1 = 12, n2 = 51, n3 = 103, n4 = 199, n5 = 261; int nums[] = { n1, n2, n3, n4, n5 }; for (int i = 0; i < sizeof(nums) / sizeof(nums[0]); i++) { std::cout << i + 1 << " " << nums << std::endl; }
std::cout << "A number from the list: "; std::cin >> num; switch (num) { case n1: std::cout << "You chose the first number which is " << n1 << std::endl; break; case n2: std::cout << "You chose the second number which is " << n2 << std::endl; break; case n3: std::cout << "You chose the third number which is " << n3 << std::endl; break; case n4: std::cout << "You chose the fourth number which is " << n4 << std::endl; break; case n5: std::cout << "You chose the fifth number which is " << n5 << std::endl; break; default: std::cout << "The number you entered isn't on the list" << std::endl; } return 0; }
I will explain it now. First of all, all programs MUST have a "main" function. The the code in the curly braces is executed when the program runs. In this program it's the only function, but you can have more. For this program I just used the "int" data type. It is just a number with no decimals that isn't too big. I forget the exact size it can go up to. If you need a bigger integer, you can use "long". So I have num, which is the variable input from the user, of type int. Then I define 5 other int constants. Constants are variables that cannot be changed in the program. I then put them in an array named nums. To define an array you put "[]" after the type and name. You can also put a number in the brackets to define the size of the array. I didn't do this as I put in all the values manually, but if I did, it would be 5. Then I made a for loop that iterates through the array. The code "sizeof(nums) / sizeof(nums[0])" may look complicated, but all it really does is get the size of the array, or 5. Then I print out a 5 number list from the array. Arrays start at 0, which is why I did "+1" on the number, that way the list is "1-5" rather than "0-4". "cout" prints to the console. "endl" creates a new line. I had to do "std::" in front of them because it's an outside class. I could have sworn there was a way to make it so you can do it without that, but I forget what it is and couldn't find it on the internet:P. Then I print a message prompting the user for a number to the console. Then I have "cin" which gets user input. In other words, the user types a number and it gets stored in num. I then do a switch to decide which message to print. The variable in parenthesis after switch is the variable being tested. So for example, if I typed 12 it would do case n1 as n1 is set to 12. It would then go on to print the code after the case up until "break". What break does is exit the switch statement, and in this case, finish the program. If a number that isn't on the list is input, the "default" statement would print instead. I don't need a break after default as it's the last statement of the switch. Switches don't require a default, but it's usually good to do one. The program ends with the line "return 0". Since main has "int" before it, it requires a return of an int to be done at the end of the program. Generally the int returned is 0, I am yet to use another int for any reason. Lastly, all statements in C++ must end in a ";". Also, "#include" imports another class or class library. In this case I used "iostream" which allows for input and output. In other words, you need to import it to use cout and cin. That's about it for this program! If you have any questions about it feel free to ask:).
Sounds complicated.
It really isn't once you get used to it. It can get a LOT more complicated.
~l)~/\/~/-\~ The tie between real life and legos is imagination .
I have heard of Pascal. It's even older than C++ as they talk about it in my book which was made in 1991:O! I don't recommend Visual Basic at all, I hated it:P. Python is good if you are just starting, but that's about it. Java and C++ are great languages and I suggest trying them sometime:).
I learnt about Apple's Swift programming language, it is pretty great IMO and I enjoyed using it. Although I may try C++ and Java one day. I will probably start with Python though. (When I have more free time)
Tell me if you do! Although I haven't done Python in 3 years, I bet I could be able to help with stuff basic to all programming;).
~l)~/\/~/-\~ The tie between real life and legos is imagination .
That's terrible! Who gets rid of programming classes, programming is the future of the world:O! I don't know HTML, but I heard it was pretty easy to learn quickly. I might learn the basics someday when I'm bored:P. I will post one of my test projects I just made in C++, assuming it fits in a post;).
I don't think it was the teacher running it's problem, more something they had to stop due to a lower budget A lot of funds got cut 'cos the NI government isn't great with money Have you seen the latest news Yeah, HTML is quite easy to learn from what I've seen. I learned a bit of it a few years ago. I think I've seen it, but I would need to examine it
Who would stop spending money on teaching kids programming? It is LITERALLY the most needed skill you can learn in school these days. Much more important than those foreign languages they make you learn:S.
~l)~/\/~/-\~ The tie between real life and legos is imagination .