Tutorial Hell

 


Hell, got your attention there. If you’re Christian that word isn’t exactly nice and for my atheist readers let’s call the post “Tutorial Poverty” That’s the only thing scary as an atheist right J. Anyways I didn’t title it this just for your attention, this was because creators on YouTube name it that. So what is “Tutorial hell” in a paraphrased (Hehe Paraphrased, I Learnt that in communication skills – ps I did not like that module at all!) form this is watching video after video of programming videos and failing to see how to apply it in real life.


It may not sound like much, but it’s a real headache especially for me, I learnt how to: Iterate, declare variables, etc. After that? My huge ego was bigger, I went around telling people I can code, I mean I can but Can I? I’ve sat there after watching these tutorials with all this information but to do what with it was a mystery. That marked my arrival in tutorial Hell.


So here lies the premise (fancy fancy word) of the post my new journey to tutorial heaven? That doesn’t sound right, but I’ll find the right word.


This is how I’m going to go about it, instead of just watching and bumming, I’m watching and doing.

So this is officially Day 1 of escaping Tutorial Hell, NB. Today doesn’t mean Today. This was typed on MS word on the 14th of April. TO be uploaded whenever I end up on the campus Wi-Fi, Yes we are very poor here and can’t afford data (this is a lie, I just blow my data in a week, I think Econet has beef with me).

So we start with a calculator. To those of you who did CS in IGCSE screaming “Oh but you’re in University, you can’t be doing such a simple thing” Shhh, my blog so I do what I want. I’m playing I’m playing, but the reason I’m starting with this is because I thought of a twist. My calculator is going to find the root of things too.

Let’s start, this is about to get technical. Get your pc, and learn how to code while you’re at it

So I created a function called “Calculate” and then created a variable called ctype which stands for calculation type.  The variable gets assigned an input from the user hence the stuff after the equals sign. On the prompt screen (Console it would Look like this.)

Noice:D

So Let’s start with the addition, the variables are localized so you seeing Num1 in add and subtract won’t affect anything.


Addition code


Of course it works, IT IS I. So the next snaps will be for the other options:


...


...


...


Now to the final part of the calculator, the twist. Finding the root of the number. My logic for this was as follows


It looked good and made sense. We divide the number by 2 and if our num 2 is now half of the number then there is no perfect root. Right? Wrong, programming never goes as planned, ever! So I used 36 as my number and this is what I got:


I mean whatttt, 6666666666, huh? Wh? I mean atleast the logic worked we got the root but damn I think we got too many roots. So Yes as usual like Step number 11 I stressed and stressed till it hit me, I ran away from my problems and tweaked the code a little J

So yeahhhhhh, now we have this


Ah, yess. I am inevitable. That’s all for today folks

IF you’re here then you probably came from my ig and you didn’t follow or like or share! What is wrong with you? Go back, do that. Thank you. Oh and



12313132345542345324353B3535464343424343576




















Comments