Make a program that says knock-knock jokes. Store the jokes in string format. Make a menu that gives the user two choices: Tell a joke, or quit. If he selects the former, display a random joke, then display the punchline/answer. Use functions, loops, and either switches, or if blocks
Make a program that says knock-knock jokes. Store the jokes in string format. Make a menu that gives the user two choices: Tell a joke, or quit. If he selects the former, display a random joke, then display the punchline/answer. Use functions, loops, and either switches, or if blocks
I made this up myself.
If you don't mind, tell me what you come up with
great idea! except make quit and tell a joke do the same thing and then send the result to all your friends :D
is either switches switch() case: or is it something i just havent heard of before?
If you are just a beginner then dont look for making huge programs , but instead look for small challenges ,
As a programmer what skill you need most is problem solving , so you can solve project euler problems(projecteuler.net). Those problems are enough to keep you busy a long long time.
If you would like to do some projects then some ideas could be an expression evaluator(calculator) , games like tictactoe etc.
make a guess my number game. This game will give instructions, get the user's guess and tell the user whether he is too high or too low. When the user guesses correctly, the program should ask if the player wants to play again.
Some pseudocode:
think of a random number
get the user's guess
if the guess is too high
tell the user
if the guess is too low
tell the user
if the guess is correct
tell the user
if the user wants to play again
play again
else
quit