Zeksy
My First Ever C-Sharp Mini Project!
Hey there!
I've invested 6 hours in learning C# so far and cleared the basics overall/got a rough idea of the syntax. I'm a python programmer working with that language for over a year.
After finishing the basics, I just made my first C# minigame, RPS nothing too crazy.
The goal was to achieve a program with the properties:
-> The program takes input from the user
-> Until the input is
rock
, paper
or scissor
, the program asks the user to re-try because invalid input
-> There are aliases for rock
, paper
and scissor
such as r
, p
and s
. So if a user types r
the program should automatically understand that they are picking rock and continue from there.
-> Making computer pick a random choice from RPS
-> Declaring the win/loss with a custom message.
I succeeded in achieving it without external help yippies and here's what the code looks like:
It's working as intended but no doubt that I could make improvements in the code. Anyone whos more experienced with the lang please tell me how would you approach it/what changes would you make to achieve the same thing in much easier/better way or simply put, how can I improve the program10 replies
Where do I code?!
Hello a little query!
I just started learning C#, it's my second language let's say. Other than that I've strong knowledge of python which I always wrote in vsc
For C#, I downloaded VS for the first time yesterday however I couldn't make myself fit into it lol it all seemed a lot more complicated and uneasy compared to VSC so I downloaded some extensions into vsc to make c# work there. Frankly I've only worked with vsc so far for all my projects
Did some research and found out the core differences between VS and VSC, however would still like someone to tell me if I'm all good sticking to vsc for now/for long term or if I should root out and start writing in vs :muidead:
38 replies