forked from tekvision/brails4
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Seed file for levels, topic & contents tekvision#8
- Refactoring db/seed , now loading from yml. - Adding Questions/Options in db/seed
- Loading branch information
1 parent
b94ddd3
commit debb58e
Showing
11 changed files
with
369 additions
and
297 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
content: | ||
title: 'Algorithm' | ||
transcript: 'So having understood the Programming Elements as DATA, DATA Types, Variables, Operators and Programming Constructs - we have everything to write a simple program - isn’t it? Oh - you must be thinking that I have not taught you a single word about Ruby as a programming language till now and expecting you to write a program? :) | ||
No Friends - I don’t and won’t expect it from you. But we will like to share with you one very interesting and at the same time very important thing. It is a very good & recommended practice to first write set of steps in plain English language for solving a particular problem before writing an actual Program in any programming language. These set of steps written in plain English language for solving a particular problem is called an ALGORITHM. Once we write these set of steps for solving any particular problem - we know exactly what we want to achieve and how are we going to get it achieved from computer. So - morale of the story - always write an algorithm before writing an actual Program. | ||
So let us write our first algorithm to add 2 numbers given by user & display the result of addition of these 2 numbers. | ||
What all things you will require for it - you will require 2 variables to hold the value of 2 no’s provided as input by user - suppose we name them as "a" & "b". We will also require a third variable for storing the value of the result of addition of these 2 no’s - lets name this variable as "c". And let us now try to write the set of steps - an algorithm - for achieving the desired result. | ||
Step 1 - Ask user to input the value of first number to add. | ||
Step 2 - Store this value provided by user in variable "a". | ||
Step 3 - Ask user to input the value of second number to add. | ||
Step 4 - Store this value provided by user in variable "b". | ||
Step 5 - Add the value inside variable "a" and variable "b" & store this result into variable "c". | ||
Step 6 - Show the value of variable "c" (which is actually the addition of 2 numbers that user did input through variable "a" & "b"). | ||
Sounds interesting friends? | ||
To summarize - we are now comfortable with the basic elements of a Programming Language which are DATA, DATA Types, Variables, Operators and Programming Constructs. And we now also know what Algorithm is. | ||
Now let us try to write an algorithm to identify whether the given no is odd or even. You also will need to help me in completing this algorithm. I will be asking you certain questions in between and we would proceed only when you give correct answers. | ||
Step 1 - Input the value of variable "a" (Note - we are going to store the value of the no to be identified as odd or even into variable "a") | ||
So since you have correctly answered Question 1, 2 & 3, let us write step 2 | ||
Step 2 - Divide variable "a" by 2 and store the remainder of this division into variable "b". | ||
Step 3 - if the value of variable "b" is 0, then display variable "a" as even number - else display variable "a" as odd number. | ||
So if you have understood the above algorithm correctly - I have a question for you."' | ||
summary: 'In this section, you will learn about - | ||
a) What is Algorithm | ||
b) Sample Algorithm' | ||
youtube_channel_url: '' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
content: | ||
title: 'Basics' | ||
transcript: 'Hello Friends | ||
Welcome to the programming Basics section. By now, I am sure that you are well-versed with the Computer Basics. And your visit to this section of site indicates that your interest & curiosity - both are increasing to know more. This time the curiosity is about Programming - a very fascinating word. We appreciate this fact and will be happy in assisting you to have a smooth ride on a Programming Tour. | ||
Do you remember we told you to keep the definition of Computer well in mind since we would need it while understanding what Programming is. | ||
For those who don’t remember - lets revise it again - Computer is an electronic device which takes an input, processes it and produces the output. Also the hard fact is Computer in itself is a dumb machine. | ||
One thing is sure that Computer being a dumb machine - we have to give instructions to Computer if we want any specific task to get done from it. | ||
Simplifying this further - A set of instructions given to a computer to achieve or accomplish a specific task is nothing but a Program. | ||
And this act of instructing a Computer is called Programming - sounds simple and interesting? | ||
Ok, now I have one simple question for you all - what is the first and foremost criteria if we want to communicate with anybody in this world? | ||
All of you may have different answers in your mind - but you will agree with the fact that "LANGUAGE" is the first and foremost criteria. That means any 2 persons who want to communicate with each other need to know a common language through which they can communicate. | ||
Here is the catch - I hope you remember we said that Computer only understands the language of 0s and 1s. | ||
And we human beings cannot speak in 0s and 1s. | ||
So how are we going to communicate with Computer? | ||
Here we introduce the concept of Programming Languages - A language which will help us communicate with a Computer. | ||
There are many programming languages which have set of instructions in English language. And since we all understand English, we can use the instruction set of these programming languages and write our own programs. | ||
Here I will like to introduce you with one more very frequently used term - Software though we have seen its definition in Level 1. | ||
We already know what Program is - it’s the set of instructions given to a Computer to achieve or accomplish a specific task. Friends - Software is nothing but a set of such programs. | ||
And programming languages are nothing but Application Software (Remember we already discussed this into Level 1 - Topic 2). | ||
So as I said, there are many programming languages but our interest is Ruby. | ||
And before going into details of Ruby as a programming langugage - we should be aware of the existing Programming Approaches or Methodologies. | ||
Broadly there are 2 existing Programming Approaches - a) Structured way of Programming and b) Object oriented way of Programming. | ||
There are some fundamental differences between these 2 approaches and instead of going into details - I will just like to mention one important difference here. | ||
As compared to Structured Programming - we can easily relate the concepts in Object Oriented Programming with the real world objects and their interactions. And you will agree with the fact that any concept - when elaborated with a real life concept or scenario - is very easy to comprehend/understand. | ||
The good news is Ruby - the language which we are planning to be in friendship with - is an Object Oriented Programming language. Hence we will have many real world examples on the go as we proceed further to understand Object Orientation in greater details.' | ||
summary: 'In this section, you will learn about - | ||
a) What is a Program & Programming | ||
b) Programming Approaches' | ||
youtube_channel_url: '' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
content: | ||
title: 'Introduction' | ||
transcript: ' Friends - Your visit to this site itself proves that you are eager to start your journey towards becoming techno-savvy. | ||
And believe us, we need this enthusiasm only, the rest you leave it to us - we will try our best to make this journey as smooth as possible - TOGETHER WE CAN DO IT. | ||
Your navigation in this site till this point also indicates that you want to start from the basic level. | ||
So lets start. | ||
Let me start with a simple question - which gadget today has taken over every single industry? - may it be a small scale or big scale industry - which gadget do you see being used everywhere you go? - may it be a Ticket booking kiosk, a Space Research Center or the smallest Shopping mall... | ||
I am sure you all know the answer - even a primary school going kid today knows about it - its Computer. | ||
Computer today has become an inevitable part of our life...this single gadget has changed the definition of literacy that if you don’t know Computer - you are illiterate. | ||
Let us try to understand what this computer is and the technicalities involved in it. | ||
In literal terms - Computer is an electronic device which takes the input, stores it in memory - processes it and then produces the output. | ||
Friends - remember this definition very well as we will need to refer it many a times throughout this journey. | ||
Remember - our entire journey - from basics till advanced - is going to revolve around this gadget called COMPUTER. | ||
Hence the more we become friendly with it, the easier our journey will be. | ||
Now lets try to understand what language this Computer understands because we need to communicate with this friend of ours. | ||
And here is the answer - This friend of ours understands only 0s and 1s. In electronic terminology, it only understands ON and OFF state. This language of 0s and 1s is called Binary Language. | ||
You must be thinking that how can we learn or make a friendship with a gadget which only understands the language of 0s and 1s. But do not worry at all - one of the topics in our Journey ahead - called Programming Language - is going to play the role of mediator between ourselves and Computer to easily convey our messages to it. | ||
As of now just remember that Computer understands the language of 0s and 1s (On and Off State). | ||
Now we will try to understand what are the major components which make this Computer as a whole? | ||
Again recall the definition of Computer - Computer is an electronic device which takes the input which can be data or instructions, stores it in memory - processes it and then produces the output. | ||
There are 3 main things - taking the input, storing it in memory & processing it and then last is producing the output. | ||
First aspect is taking the input - this is taken care by the Input Unit - one of the components of Computer. | ||
This unit contains devices with the help of which we enter data into computer or give instructions to Computer. This unit makes link between user and computer. | ||
Some of the input devices are keyboard and mouse. | ||
Second aspect is storing the input in memory & processing it - this is taken care by the Central Processing Unit (also called CPU). CPU is considered as the brain of the computer. CPU performs all types of data processing operations. It stores data , intermediate results and instructions(program).It controls the operation of all parts of computer. | ||
And the third aspect is producing the output - this is taken care by the output unit - Output unit consists of devices with the help of which we get the information from computer. This unit is a link between computer and users. | ||
Some of the Output devices are Monitor and Printer.' | ||
summary: 'In this section, you will learn about - | ||
a) What Computer is | ||
b) Input Devices | ||
c) Output Devices' | ||
youtube_channel_url: 'http://youtu.be/MG_SxId9Wuw' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
content: | ||
title: "Introduction to Classes and Objects" | ||
transcript: "Friends - In level 2 - we understood that Ruby is an Object Oriented Programming Language. For learning any Object Oriented Programming language - we need to understand some basic concepts of Object-Orientation. In Programming jargon - they are also called as Object Oriented Programming specification concepts or in short OOPS concepts. | ||
But before proceeding to understand OOPS principles - will you please guess which thing could be at the core of any object oriented programming language? I am sure everybody of you must be able to answer this question and it’s Object. Object is at the core of any Object Oriented Programming language. | ||
So what exactly is an Object? I guess everybody of us someday or other must have come across this terminology called Object. | ||
Remember friends - the simplest definition of an object - Anything that can be seen with the necked eyes is an object. So with this as a definition - every physical thing in this world is an object. | ||
For e.g myself is an object, Nitin is an object, Siddhant is an object, the table is an object, the fan is an object and the list is endless. | ||
And if you give subtle attention, you will find that every object has certain characteristics and with the help of these characteristics it performs certain operations. | ||
So when I say Nitin as an object - it has hands, legs, nose, ear and so on. So in Object Oriented terminology, these characteristics are called as Attributes of an Object. | ||
With hand - Nitin writes & eats, with legs - he walks, with nose - he smells & with ear - he listens. So in OO terminology, these operations of writing, eating, walking are called behaviors. | ||
So every object has certain attributes and behaviors. | ||
Now tell me something - every human being has hands, legs, nose and ear and every human being writes, walks, smells & listens. So we can abstract out these common attributes and behaviors of all these human beings into a common/single entity. And this entity is nothing but a Class - another most important term in OO terminology. Wondering what abstract term is? Wait - we are going to elaborate this further. | ||
So we can say Human Being is a Class. But it’s an abstract thing - I mean when I say human being - I don’t have a clear idea of anybody as such in front of me. But when I say Nitin or Siddhant or Sangapal - I have clear idea of these guys since they are concrete - not abstract. | ||
So if Human Being is a class - then Nitin, Sangapal , Siddhant are instances/objects of this class. | ||
One more example to clarify the concept of a class - You people must be aware of the Brick Manufacturing Unit where bricks are made. They create a single mould of brick - and out of this mould - they create multiple bricks. So though we cannot use the mould in construction, we definitely use the bricks created out of this mould in construction. So we can say the Mould is an abstract thing - a Class and all the bricks created out of these mould are concrete instances/Objects of this class. | ||
I hope we are very much clear with the concept of Class and an Object now." | ||
summary: "In this section, you will learn about - | ||
a) What is Class and an Object? | ||
b) Attributes and Behavior of an Object" | ||
youtube_channel_url: "http://youtu.be/rQaof2Yf490" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
content: | ||
title: 'Memory' | ||
transcript: 'Do you remember we have referred a word "Memory" many a times throughout our discussion so far? | ||
Yes Friends - the way we human beings have memory - computer too has a memory. Now stretch your brain a bit to think what is the significance of memory in our case? And then try to relate it to the Memory of a computer. If you have understood the discussion so far, you will definitely agree that human memory and Computer memory resembles to quite an extent. | ||
Tell us how? | ||
We human beings constantly take input from around us - may it be an audio input or video input - this input goes into our memory where we attach labels to these inputs - may be good or bad - personal or professional (processing) and accordingly produce the output (respond to the external inputs). | ||
In the same way - Computer too stores the input in memory, processes it and produces the output. | ||
Memory is broadly divided into 2 categories - Primary Memory and Secondary Memory. | ||
We will first elaborate on the Secondary Memory - | ||
Secondary memory (or secondary storage) is the slowest and cheapest form of memory. It cannot be processed directly by the CPU. It must first be copied into primary memory (Storage) which is also known as RAM. | ||
Secondary memory devices include magnetic disks like hard drives and floppy disks; optical disks such as CDs and DVDs; and magnetic tapes, which were the first forms of secondary memory. Nowadays - magnetic tapes are hardly used - mostly Hard Disk Drives, Pen Drives and CDs/DVDs are used. | ||
All your System Programs as well Application Programs reside on Secondary Memory. | ||
As mentioned in the earlier discussion, Primary Memory many a times is referred to as Random Access Memory (RAM). This is the "MAIN" working memory used by the computer. When we switch on the computer, the Operating System programs are loaded or copied into this memory. So the speed of computer is faster if you have more RAM. | ||
Along with operating system programs, whatever applications we start in our system, they are loaded into this main working memory(RAM). | ||
Please remember that the Data and Programs stored in RAM are volatile ( i.e. the information is lost when you switch off the computer) while the data stored on Secondary Memory devices does not get deleted when we switch off the computer. It permanently resides there unless somebody explicitly deletes it.' | ||
summary: 'In this section, you will learn - | ||
a) Primary Memory | ||
b) Secondary Memory' | ||
youtube_channel_url: '' |
Oops, something went wrong.