Thursday, June 1, 2017

21st class at 17/05.2017

Today is uki 21st class. 
Today is 1 month anniversary in uki.life. I got an award is best blogger writer. So I feel very happiness. Then I studies Javascript.  

While loop

Syntax
while (condition) {

code block to be executed

}

Eg: 1)

while (a < 5) {
    text += "number is " + a;
    a++;
}

output:

number 1

number2

number3

number4

Do/While Loop

Syntax

do {
    code block to be executed
}
while (condition); 

Eg: 2)

do {
    text += "number " + a;
    a++;
}
while (a< 5);  

output:

number 1

number2

number3

number4

more example coding

1) i=1;
a=1;
while(a<=10)
{
    i=i*3;
  document.write("The number is "+"   3"+"<sup>"+a+"</sup>"+"  =  "+i+"<br>" );
a++;
}
2)i=0;
var text=""
do{
  text+= "<br>The number is "+i;
  i++;
}
while(i<10);
  document.getElementById("demo").innerHTML=text;
Thankyou

meet tommorrow bye..........

Wednesday, May 17, 2017

20th class at 16.05.2017

Today is uki 20th class

Today I study javascript. 

1)
<script>
for(i=0; i<10; i++)
document.write("Hello world"+"<br>");
  </script>

  <p id="demo"></p>
  <script>
  var text="";
  var i;
  va
  for(i=10; i>0; i--)
  {
    text+="The number is "+i+"<br>";
}
document.getElementById("demo").innerHTML=text;
  </script>


2)
    <p id="demo"></p>
    <script>
    var fruit = ["Apple", "Orange", "Mango", "Pineapple"];
    var i;
    var text="";
    for(i=0; i<fruit.length; i++)
    {
        text+=fruit[i] +"<br>";
    }
    document.getElementById("demo").innerHTML=text;
    </script>

    <p id="demo"></p>
    <script>
    var txt="";
     var person={fname:"John", lname:"Doe", age:"25"};
     var x;
     for (x in person) {
         txt += person[x]+" ";
     }
document.getElementById("demo").innerHTML=txt;
    </script>


3)
  <p id="demo"></p>
  <script>
    var grade= ["A", "B", "C", "D","F"];
    for(i=0;i<grade.length; i++)
    {
    switch(grade[i])
    {
        case "A":
    document.write("your garde is "+grade[i]+ " Very good<br />");
                break;
        case "B":
        document.write("your garde is "+grade[i]+ " Good<br />");
                break;
        case "C":
            document.write("your garde is "+grade[i]+ " Avg<br />");
                break;
        case "S":
                document.write("your garde is "+grade[i]+ " Pass<br />");
                break;
        case "F":
    document.write("your garde is "+grade[i]+ " fail<br />");
            }

</script>
 
this coding output is tomorrow this blog.
thankyou

19th class at 15.05.2017

Today is uki 19th class 

Today I study javascript.

1)
<script>
var a=3;
if(a>10){
  document.write("value of "+a+" is greater than 10");
}
else {
  document.write("value of "+a+" not greater than 10");
}
</script>

2)
<script>
var age=15;
if(age>18){
  document.write("<b> Qualifies for driving </b>");
else{
  document.write("<b> Does not qualify for driving </b>");
}
</script>

3)
<script>
var mark=25;
if(mark>75){
  document.write("your marks is "+mark+" Garde A");
  }
  else if(mark>50){
    document.write("your marks is "+mark+" Garde B");
      }
      else if (mark>40) {
        document.write("your marks is "+mark+" Garde C");
          }
else  {
  document.write("your marks is "+mark+" Garde Fail");
}
</script>

4)
<script>
var salary=30000;
var mysalary=30000;
if(salary==mysalary){
  window.alert("your salary and my salary are same");
  }
  else if(salary>mysalary){
    window.alert("your salary is greater than my salary ");
      }
      else {
      window.alert("my salary is greater than your salary ");
          }
</script>

5)
<p id="demo"></p>
<script>
var day;
switch(new Date().getDay())
{
  case 0:
  day ="Sunday";
  break;
  case 1:
  day ="Monday";
  break;
  case 2:
  day ="Thuesday";
  break;
  case 3:
  day ="Wednesday";
  break;
  case 4:
  day ="Thursday";
  break;
  case 5:
  day ="Friday";
  break;
  case 6:
  day ="Saturday";
  break;
  default:
  day ="Unknown Day";
}
document.getElementById("demo").innerHTML="today is "+ day;
</script>

6)
<p id="demo"></p>
<script>
var month;
switch(new Date().getMonth() )
{
  case 0:
  case 2:
  case 4:
  case 6:
  case 7:
  case 9:
  case 11:
  month="this month has 31 days";
  break;
  case 1:
month="this month has 28 days";
  break;
  case 3:
  case 5:
  case 8:
  case 10:
  month="this month has 30 days";
  break;
    default:
  month ="Unknown Month";
}
document.getElementById("demo").innerHTML=month; 


thankyou 

15th class at 09.05.2017

Today is uki15th class 
Today I learned javascript. 
1)
<script>
txt1="What a very ";
txt1+="nice day";
document.getElementById("demo").innerHTML=txt1;
</script>


{ouput: What a very nice day}


2)
<script>
var x=10;
x+=5;
document.getElementById("demo").innerHTML=x;
</script>

{output : 15}

3)
<script>
var carName1="Volvo XC60";
var carName2="Volvo XC60";
var answer1="It's alright";
var answer2="He is called 'johnny'";
document.getElementById("demo").innerHTML=carName1+"<br>"+carName2+"<br>"+answer1+"<br>"+answer2;
</script>

{output:

Volvo XC60Volvo XC60It's alrightHe is called 'johnny'}

4)

 <script>
var cars=["saab","Volvo","BMW"];
document.getElementById("demo").innerHTML=cars[0];
document.getElementById("demo1").innerHTML=cars[0]+"<br>"+cars[1]+"<br>"+cars[2];
</script>

{output: saab Volvo BMW}


5)
<script>
var person={
    firstname : "Dilani",
    lastname : "karthi",
    age : 19,
    eyecolor : "black"
};
document.getElementById("demo1").innerHTML=person.firstname+" is "+person.age+" years old.";
document.getElementById("demo").innerHTML=person.firstname+"'s eyecolor is "+person.eyecolor+".";
document.getElementById("demo2").innerHTML= person["firstname"]+" "+person["lastname"];
</script>


6)
<script>
document.getElementById("demo").innerHTML= typeof 0 +"<br>"+typeof 314 + "<br>" + typeof 3.14+ "<br>"+ typeof (3)
+"<br>" + typeof (3+4)+"<br>"+typeof "john"+"<br>"+typeof [1,2,3]+"<br>"+typeof true +"<br>"+typeof false+"<br>"+typeof {name:"john", age:34}+"<br>"
+typeof function myfun(){};
</script>


7)
<script>
function myfun(p1,p2){
    return p1*p2;
}
function myfun1(p1,p2){
    return (p1+p2)/2;
}
    function myfun2(f){
        return (5/9*(f-32));
}
document.getElementById("demo").innerHTML= myfun(1,3);
document.getElementById("demo1").innerHTML= myfun1(1,3);
document.getElementById("demo2").innerHTML= myfun2(75);
</script>


8)
<script>
var person={
    firstname:"Abi",
    lastname:"Karish",
    age:27,
    address:"jaffna"
};
document.getElementById("demo").innerHTML=person.["firstname"]+" "+person.["lastname"];
</script>


thankyou

Monday, May 15, 2017

14th class at 08.05.2017

Today is uki 14th class

JavaScript
JavaScript is the world's most popular programming language. It's the language for HTML and the webpage, for servers, tablets, pc, laptops and more..........
javaScript is programming code that can be inserted into html  page.

Eg:-
1)
<html>
<head>
<title>Javascript</title>
</head>
<body>
<script>
document.write("My first javascript ");
</script>
</body>
</html>

Output :- 
My first javascript

2) 
<button type='button' onclick="document.getElementById('demo').innerHTML='hello Java script!'">Click me </button>


{click button then print hello java}



<button type='button' onclick="document.getElementById('demo').style.fontSize='35px'">Click me </button>

{click button change fontsize}





<button type='button' onclick="document.getElementById('demo').style.color='red'">Click me </button>


{click button change fontcolor}


<button type='button' onclick="document.getElementById('demo').style.display='none'">Click me </button>
{click button remove button}

3)
< id='demo'></p>
<p id='demo1'></p>
    <p id='demo2'></p>
    <p id="demo3"></p>
    <button onclick="document.write(5+7)">Try it</button>
<script>
document.getElementById("demo").innerHTML=5+6;
document.getElementById("demo1").innerHTML="5+6";
document.getElementById("demo2").innerHTML="5"+"6";
document.write(4+10);
window.alert(3+1);
console.log(8+3);
var x,y,z;
x=15;
y=6;
z=x+y;
document.getElementById("demo3").innerHTML=z;
</script>


do you want more information to visit https://www.w3schools.com/js/

thank you

Sunday, May 7, 2017

13 th class at 05.05.2017

Today is uki 13th class 
How to create GitHub page
 1) Create a new Repository
 2) Then go to terminal and download file
(git clone https://github.com/Karthigesudilani/karthigesudilani.github.io.git)
3) Then create an index file 
4) upload this file
(git push origin master)
5) then open web browser type http://karthigesudilani.github.io 
you can see you web page


Then give an assessment 
then we meet java script
thank you
 

Friday, May 5, 2017

12 th class at 04.05.2017

Today is uki 12th class
I make a demo project in using Bootstrap.