Send me a gwei! (ether address, all donations accepted!) 0xfFB33D2Af25909eB92dF5Da6236b69c4AFBaC692 send me a satoshi! (bitcoin address, all donations accepted!) 0xfFB33D2Af25909eB92dF5Da6236b69c4AFBaC692
Current Channel Goal: 25,000 Subs!
Hey folks, Tech Nervous here.
I've been brushing up on my C Sharp programming skills lately
and I just found this website
with some programming challenges,
similar to Coding Bat for Java, but this is for C Sharp.
So I'm gonna jump in and do a couple of these.
This first one is basically explaining how this works.
Now, if you've never coded before,
definitely check this out.
And they have a little demo here as well.
So, code tab.
All you have to do is type return true
between the curly braces.
This is a main method there.
Oh, okay, fine.
We'll sign in with Google.
Maybe.
I am Tech Nervous.
All right, check.
And these should get progressively harder as they go,
but it's a really fun way to brush up on your coding skills.
Looks like test passed.
So we hit final.
And I'm hoping it'll just take me right
to the next challenge.
I haven't played around with this yet.
That was actually my first interaction with it.
I just, sometimes I crave doing a little bit of code
and don't have anything to code.
So these challenges are a good way to keep your skill up.
So how difficult was this challenge?
Very easy.
Your skill level.
I'm gonna leave it at beginner.
I'm a little rough.
Convert minutes into seconds.
Code equals public static int.
So we're gonna return an int.
So let's see.
Int minutes.
S.
S equals 60.
Oh, a minus instead of an equals.
Whoops.
There we go.
Submit final.
That means we got that one complete.
We're just gonna roll through a couple of these
and have a good time.
Very easy.
All right, create a function that takes a number
as its only argument.
Returns true if it's less than or equal to zero.
Otherwise, false.
True if less than or equal to zero.
We can do that with a less than or equal to else.
A semi-colon there.
That one was complete as well.
So moving on.
Really could do without rating every single one.
I wish there was a way to skip that.
Looks like these beginner challenges
are giving me five XP per.
I don't know what that's even used for, but whatever.
Create function takes two numbers as arguments
and return their sum.
This one's easy as well.
Your C equals A, it's on the button, plus B.
Okay, so that should work.
Although, I'm curious if we can just do that.
Yep, return it in one line.
That's not bad.
Moving on.
Like the cute little game music there
when you complete a level.
Function that reverses a boolean value.
This one's easy as well.
So what I'm saying there is return not boolean
or return the opposite of the value
of what they're passing in.
Expected symbol.
Oh, semi-colons, man.
You know, syntax is kind of a thing.
There we go.
Anytime now these should start
getting a little bit more difficult,
but this is pretty simple stuff.
Give an n-sided regular polygon, n,
and the total sum.
Okay, so n will always be greater than two.
The formula n minus two times 180
is the sum of all the measures of the angles.
Okay, so n minus two times 180.
Oh, I didn't return it.
What does it say for my error?
Is it's num.
Again, we'll just skip initializing a new int
and return num minus two times 180.
That's the formula they gave us.
And it passed.
Moving on.
It's a great brain exercise.
I mean, I can literally just sit here
and do this all day.
It's a long watch me, but I'm entertained.
A slow connection there.
Okay, write a function that takes the base
and height of a triangle and return its area.
The area of a triangle is base times height divided by two.
Don't forget to return base times height divided by two.
It's practically giving us the answers.
There's not really fair, but okay.
Just notice the practice and shuffle buttons there as well.
I'm gonna say medium, just do what it says.
Create a function that takes the age in years
and returns the age in days.
Okay, and the note's saying 365.
Ignore leap years and days between last birthdays.
Expect only positive results.
Excuse me.
So, write code, int age.
Wait, we're supposed to get years?
So that's the age in years,
and we're supposed to return a rent?
Too easy.
Let's see what else they got under practice here.
Ooh, okay, so that brings us basically
the same problems it looks like.
In seconds, a function that takes the base of this.
This one we did already as well.
Not gonna return a when you don't have that variable, buddy.
Make a few simple mistakes, mostly because I'm rusty.
Less than or equal to zero.
If else, all the stuff I've already done.
That's all that was, every single question.
I guess we'll go back to challenges.
We'll do some more of those.
Complete, cool.
What it says.
Very random, unsolved challenge.
Just sort the number array in ascending order.
Function, the argument is null.
Empty array or undefined.
This is gonna take me a minute to remember.
But I do know how to do it, so.
So, let's check.