Thank you
Am I Ready?
#1 Members - Reputation: 100
Posted 01 August 2011 - 07:05 PM
Thank you
#2 Moderators - Reputation: 4828
Posted 01 August 2011 - 07:07 PM
Yes. Give it a try!I have been reading through a book on C# and i was wondering if you think i am ready to start writing extremely basic programs.
Sloperama Productions
Making games fun and getting them done.
www.sloperama.com
Please do not PM me. My email address is easy to find, but note that I do not give private advice.
#4 Members - Reputation: 786
Posted 01 August 2011 - 07:40 PM
(Also, this may sound like a noob question, but what programs should i start off with?)
Thank you
Depends on what you've learned so far. Off the top of my head:
Some very basic string manipulation, to practice input/output, loops, and a few standard library methods:
1. Ask for a name, user enters a name, output the the name in all capital letters
2. As above, except output each letter separately then pause until the user hits the enter key
3. As above, but output the letters backwards, or in alphabetical order, or shuffle them randomly
4. Create a simple database, where the user enters names and phone numbers. If the user hits enter without entering a name, ask for a name, and then output the associated phone number previously entered
5. As above, but save the name/number data to a text file.
A simple game might be a guess-the number, where after each guess the program outputs "higher" or "lower" until the user guesses correctly (or only give the user a fixed # of guesses before loosing).
#6 Members - Reputation: 132
Posted 01 August 2011 - 10:57 PM
XXXXXXXX
AAAXXXXX
XXAAAXXX
XXXXAXXX
XXAAAXXX
XXAXXXXX
XXAAAAAA
XXXXXXXX
Put the above 8x8 matrix in the text file. Starting at the first A, write a generic program to find a way from the the A in the first column to the A in the last column. Of course, you'll have to assume that there are no loops and first and last row only has one A each to keep it simple. At the end you must print out the number of A's to get to the end. Recursion is a very important concept and I think this is a very good exercise for that.
#8 Members - Reputation: 120
Posted 02 August 2011 - 01:52 AM
Ready are you, young Jedi! You could start with a text-based Higher or Lower card game. This would involve making both a data structure to represent a single card and one for representing a deck (which would manage 52 card structures), being able to represent each of them on the screen (for example "9C" for "9 of clubs"), and compare them to find out which has the higher value -- all in all a good, little beginner's project that will teach you some basic principals of game programming.I have been reading through a book on C# and i was wondering if you think i am ready to start writing extremely basic programs. I have been doing the examples in the book and trying not to move on in the book untill i am reasonably comfortable with what i have just read. (Also, this may sound like a noob question, but what programs should i start off with?)
#9 Members - Reputation: 119
Posted 02 August 2011 - 01:55 AM
I have been reading through a book on C# and i was wondering if you think i am ready to start writing extremely basic programs. I have been doing the examples in the book and trying not to move on in the book untill i am reasonably comfortable with what i have just read. (Also, this may sound like a noob question, but what programs should i start off with?)
Thank you
Dude you don't realy learn from reading you learn from writing the code.. Just give it a try!
Myself when i started learning java i tried to make my own swing applications and i had great fun with it also and it helped me learn alot!
So realy my advice is just go for the console applications if you never realy coded before.
#10 Crossbones+ - Reputation: 1148
Posted 02 August 2011 - 02:18 AM
#11 Crossbones+ - Reputation: 451
Posted 02 August 2011 - 07:58 AM
As you learn new things like graphics, sound, or networking, you can add them to your Pong game... you can basically start at zero and (if you stick with it) incrementally improve things until you have a professional-looking game. Sticking with one game and improving it over time will also teach you a lot about code re-use, which plenty coders don't really grasp until they've been writing code for a year or two.
#12 Members - Reputation: 100
Posted 02 August 2011 - 09:28 AM
Depends on what you've learned so far. Off the top of my head:
Some very basic string manipulation, to practice input/output, loops, and a few standard library methods:
1. Ask for a name, user enters a name, output the the name in all capital letters
2. As above, except output each letter separately then pause until the user hits the enter key
3. As above, but output the letters backwards, or in alphabetical order, or shuffle them randomly
4. Create a simple database, where the user enters names and phone numbers. If the user hits enter without entering a name, ask for a name, and then output the associated phone number previously entered
5. As above, but save the name/number data to a text file.
A simple game might be a guess-the number, where after each guess the program outputs "higher" or "lower" until the user guesses correctly (or only give the user a fixed # of guesses before loosing).
I am having trouble with #2, I dont know how to do it, i have tried looking but i have found nothing yet
#13 Members - Reputation: 1865
Posted 02 August 2011 - 11:07 AM
I am having trouble with #2, I dont know how to do it, i have tried looking but i have found nothing yet
2. As above, except output each letter separately then pause until the user hits the enter keyCan anyone give me a hint on how i could do it please?
Hint: You can use a string like an array of chars.
#15 Members - Reputation: 120
Posted 02 August 2011 - 01:02 PM
No, you are not stupid; programming can be very difficult in the beginning when you are unfamiliar with even the most basic principals. If you list your program so far I may be able to give you a few guideline =)Am i being stupid? I still can't do it
All i can find is how to split string that have commas in, but none about splitting a word
#16 Members - Reputation: 100
Posted 02 August 2011 - 02:02 PM
No, you are not stupid; programming can be very difficult in the beginning when you are unfamiliar with even the most basic principals. If you list your program so far I may be able to give you a few guideline =)Am i being stupid? I still can't do it
All i can find is how to split string that have commas in, but none about splitting a word
This is what i have got for # 1 and 3:
using System;
class BasicProject1
{
static void Main()
{
string name, nameUp, nameBack;
Console.Write("Please enter your name: ");
name = Console.ReadLine();
nameUp = name;
nameUp = nameUp.ToUpper();
nameBack = name;
Console.WriteLine("Your name in capitals is: " + nameUp);
Console.Write("Your name backwards is: ");
for (int i = 0; i < nameBack.Length; i++)
{
Console.Write(nameBack[nameBack.Length -i - 1]);
}
Console.ReadLine();
}
}
#17 Members - Reputation: 120
Posted 02 August 2011 - 02:49 PM
This is what i have got for # 1 and 3:
using System;
class BasicProject1
{
static void Main()
{
string name, nameUp, nameBack;
Console.Write("Please enter your name: ");
name = Console.ReadLine();
nameUp = name.ToUpper(); // string.ToUpper returns a copy of the string so I merged the two lines
nameBack = name;
Console.WriteLine("Your name in capitals is: " + nameUp); // Good! Task #1 complete <img src='http://public.gamedev.net/public/style_emoticons/<#EMO_DIR#>/smile.gif' class='bbc_emoticon' alt=':)' />
// I am not going to solve #2 for you, but here is a tip:
// Console::ReadKey(Boolean) will read the next keystroke by the user, including function keys,
// and if you set the Boolean value to "true" it will not output the read character on the screen.
Console.Write("Your name backwards is: ");
// When you are dealing with strings (that fall into the category "things that may change at run-time")
// it is usually a good idea to assign its length to a local variable when accessing each character in turn
// before you start the for-loop like this:
//
// int i,n=nameBack.Length;
//
// for(i=0;i<n;i++)
// {
// ...
// }
for (int i = 0; i < nameBack.Length; i++)
{
Console.Write(nameBack[nameBack.Length -i - 1]);
}
Console.ReadLine();
}
}
#19 Members - Reputation: 1865
Posted 02 August 2011 - 06:47 PM
#20 Members - Reputation: 100
Posted 02 August 2011 - 07:14 PM
Another hint for #2: Watch what happens in your loop that prints the name backwards. Put a breakpoint inside the loop and watch your output each time you step through the loop. It prints out one letter at a time, right? You should be able to add something else inside the loop which makes it wait in a similar way to the breakpoint (previous people have hinted how to do this).
Thanks! I finally done it! Well im pretty sure i have
using System;
class BasicProject1
{
static void Main()
{
string name, nameUp, nameBack;
// Task One
Console.Write("Please enter your name: ");
name = Console.ReadLine();
nameUp = name.ToUpper();
nameBack = name;
Console.WriteLine("Your name in capitals is: " + nameUp);
// Task Two
int s = name.Length;
for (int i = 0; i < s; i++)
{
Console.Write(name[i]);
Console.ReadKey(true);
continue;
}
// Task Three
Console.Write("\nYour name backwards is: ");
int n = nameBack.Length;
for (int i = 0; i < n; i++)
{
Console.Write(nameBack[nameBack.Length -i -1]);
}
Console.ReadLine();
}
}







