Monday, August 2, 2021

Leap Year Checker in AngularJS

Machine Problem

Write a program that will ask the user to give a year and then the program will determine whether the given year is a leap year or not.

I am currently accepting programming work, IT projects, school and application development, programming projects, thesis and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me at the following email address for further details.  If you want to advertise on my website, kindly contact me also at my email address also. Thank you.

My email address is jakerpomperada@gmail.com and jakerpomperada@yahoo.com

My mobile number here in the Philippines is 09173084360.






Program Listing

<!-- index.htm

  Author   : Prof. Jake Rodriguez Pomperada, MAED-IT, MIT

  Date     : July 21, 2021  Wednesday  3:42 PM

  Place    : Bacolod City, Negros Occidental

  Websites : www.jakerpomperada.com and www.jakerpomperada.blogspot.com

  Email    : jakerpomperada@gmail.com

 -->

<html ng-app="mainApp">

<head>

<title>Leap Year Checker in AngularJS</title>

</head>

<style>

body {

font-family: arial;

font-size: 25px;

font-weight: bold;

}

</style>

<script type="text/javascript" src="angular.min.js">

</script>


<script type="text/javascript">


// AngularJS Controller Declaration

angular.module('mainApp', []).service('myService', function() {

  this.myFunc = function(year) {

   if (year % 4 === 0) {

      if (year % 100 === 0){

         if (year % 400 == 0){

            return ("Leap Year.");

         } else {

            return ("Not Leap Year.");

         }

      } else {

         return ("Leap Year.");

      }

   } else{

      return ("Not Leap Year.");

   }


  };

}).controller('Leap_Year_Controller', function($scope, myService) {

  $scope.check = function(year) {

    $scope.myUserService = myService.myFunc(year);

  }


});

</script>


<div ng-app="mainApp" ng-controller="Leap_Year_Controller">

<form>

<table border="0" cellspacing=10>

<tr>Leap Year Checker in AngularJS</tr>

<tr>

  <td>Enter a Year</td>

<td><input type="number" ng-model="year_1" ng-init="year_1=0" ng-keyup="check(year_1)"/></td>

</tr>

<table>

</form>

<b>The given year {{year_1}} is a {{myUserService}}</b>

</div>

</body>

</html>




Sunday, August 1, 2021

Centimeter, Inches, and Feet Conversion in JavaScript

Centimeter, Inches, and Feet Conversion in JavaScript

 A simple centimeter, inches, and feet conversion and vice versa using JavaScript programming language.

I am currently accepting programming work, IT projects, school and application development, programming projects, thesis and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me at the following email address for further details.  If you want to advertise on my website, kindly contact me also at my email address also. Thank you.

My email address is jakerpomperada@gmail.com and jakerpomperada@yahoo.com

My mobile number here in the Philippines is 09173084360.






Program Listing

<html>

   <title>Centimeter, Inches, and Feet Conversion in JavaScript  </title>

 <style type="text/css">


 body {


  font-family: arial;

  font-weight: bold;

  font-size:15px;

  }

 

 form

{

  display: inline-block;

  background-color: lightblue;

  padding: 6px;

}


label{

  display: block;

  direction: rtl; 

}


input{

  direction: ltr; 

}


label::after{

  content: attr(data-text);

}

 </style>


<script language="JavaScript">


function cmConverter(){

document.converter.inch.value = (document.converter.cm.value / 2.54).toFixed(2);

document.converter.feet.value = (document.converter.cm.value / 30.48).toFixed(2);

}

function inchConverter(){

document.converter.cm.value = (document.converter.inch.value * 2.54).toFixed(2);

document.converter.feet.value = (document.converter.inch.value / 12).toFixed(2);

}

function feetConverter(){

document.converter.cm.value = (document.converter.feet.value * 30.48).toFixed(2);

document.converter.inch.value = (document.converter.feet.value * 12).toFixed(2);

}


function Clear() {

document.converter.cm.value ="";

document.converter.feet.value="";

document.converter.inch.value="";

document.converter.cm.focus();

 

}


</script>

<body>

<br>

<h3>Centimeter, Inches, and Feet Conversion in JavaScript</h3>

<form name="converter">

<label data-text="Centimeter">&nbsp;&nbsp;

<input type="text" name="cm" onChange="cmConverter()" required="">

</label>

<br />

<label data-text="Inches">&nbsp;&nbsp;

<input type="text" name="inch" onChange="inchConverter()" required="">

</label>

<br/>

<label data-text="Feet">&nbsp;&nbsp;<input type="text" name="feet" onChange="feetConverter()" required="">

</label>

<br /> <br>

<input type="button" value="Convert" title="Click here to convert." />

<input type="button" value="Clear"  

title="Click here to clear the text box."

onclick="Clear()"/>

</form>

</body>

</html>

Saturday, July 31, 2021

Average Score in AngularJS

Average Scores in AngularJS

 Machine Problem

Write a program that will ask the user to give five scores and then the program will compute the total score, and the average score of the five scores given by the user and display the results on the screen.

I am currently accepting programming work, IT projects, school and application development, programming projects, thesis and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me at the following email address for further details.  If you want to advertise on my website, kindly contact me also at my email address also. Thank you.

My email address is jakerpomperada@gmail.com and jakerpomperada@yahoo.com

My mobile number here in the Philippines is 09173084360.





Program Listing

<!-- index.htm

  Author   : Prof. Jake Rodriguez Pomperada, MAED-IT, MIT

  Date     : July 21, 2021  Wednesday   2:17 PM

  Place    : Bacolod City, Negros Occidental

  Websites : www.jakerpomperada.com and www.jakerpomperada.blogspot.com

  Email    : jakerpomperada@gmail.com

 -->

<html>

<head>

<title>Average Scores in AngularJS</title>

</head>

<style>

body {

font-family: arial;

font-size: 25px;

font-weight: bold;

}

</style>

<script type="text/javascript" src="angular.min.js">

</script>



<div ng-app ng-init="score1=0;score2=0;score3=0;score4=0;score5=0">

<form>

<table border="0" cellspacing=10>

<tr>Average Scores in AngularJS</tr>

<tr>

<td>Enter First Score </td>

<td><input type="number"  ng-model="score1" ></td>

</tr>

<tr>

<td>Enter Second Score </td>

<td><input type="number" ng-model="score2" ></td>

</tr>

<tr>

<td>Enter Third Score </td>

<td><input type="number"  ng-model="score3" ></td>

</tr>

<tr>

<td>Enter Fourth Score </td>

<td><input type="number"  ng-model="score4" ></td>

</tr>

<tr>

<td>Enter Fifth Score </td>

<td><input type="number"  ng-model="score5" ></td>

</tr>

<table>

</form>

<p>The total score is {{ (score1+score2+score3+score4+score5) }}. </p>

<p>The average score of five scores is  

{{ ((score1+score2+score3+score4+score5)/5) | number : 0}}. </p> 

</div>

</body>

</html>


Friday, July 30, 2021

Payroll Program Using JavaScript

Payroll Program Using JavaScript

 A simple payroll program using JavaScript programming language that will compute the salary of the employee.

I am currently accepting programming work, IT projects, school and application development, programming projects, thesis and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me at the following email address for further details.  If you want to advertise on my website, kindly contact me also at my email address also. Thank you.

My email address is jakerpomperada@gmail.com and jakerpomperada@yahoo.com

My mobile number here in the Philippines is 09173084360.





Program Listing

<html>

<style>

body,p {


  font-family:arial;

  font-size:16px;

  font-weight:bolder;

 }

 

    .container {

        width: 500px;

        clear: both;

    }

    .container input {

        width: 100%;

        clear: both;

    }


    </style>

<div class="container">

<body>

<h3> Payroll Program in JavaScript </h3>

<br/>Employee's Name

<input type="text" id="emp_name" name="emp_name">

<br>

<br/> Daily Rate

<input type="text" id="daily_rate" name="daily_rate">

<br>

<br/> Number of Days Work

<input type="text" id="no_days_work" name="no_days_work">

<br>

<br>

<button onclick="solve_salary()">Solve Salary</button>

<br><br>

<p id="demo"></p>

<p id="demo2"></p>

</div>

<script>

  function solve_salary() {

  var  emp_name = document.getElementById("emp_name").value;

var  daily_rate = document.getElementById("daily_rate").value;

var  no_days_work = document.getElementById("no_days_work").value;

     gross_pay= parseFloat(daily_rate) * no_days_work;

 

      results = "Employee's Name :     " + emp_name + ".";

  results2 ="Basic Salary  : Php " + gross_pay.toFixed(2)+".";

     

      document.getElementById("demo").innerHTML = results;

  document.getElementById("demo2").innerHTML = results2;

 

  }

</script>

</body>

</html>


Thursday, July 29, 2021

Student Average Grade Using Classes in Python

Machine Problem in Python 

1. Create an app that computes students average solve using classes.

2. The user will input the following (Name, Math, Science and English Grade)

3. Create a Class called Students

4. Use the init function to collect the student information (Name, Math, Science and English Grade)

5. Create a function that will perform the computation of the average

6. Create a function that will display the result


SAMPLE OUTPUT:

Name: Jake R. Pomperada

Math: 90

Science: 90

English: 90

Average: 90 (Passed)

I am currently accepting programming work, IT projects, school and application development, programming projects, thesis and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me at the following email address for further details.  If you want to advertise on my website, kindly contact me also at my email address also. Thank you.

My email address is jakerpomperada@gmail.com and jakerpomperada@yahoo.com

My mobile number here in the Philippines is 09173084360.





Program Listing

# student_grade_classes.py
# Jake Rodriguez Pomperada, MAED-IT, MIT
# July 29, 2021 Thursday
# www.jakerpomperada.com and www.jakerpomperada.blogspot.com
# jakerpomperada@gmail.com
# Bacolod City, Negros Occidental Philippines

class Students:
def __init__(self, name, math, science, english):
self.pangalan = name
self.matematika = math
self.agham = science
self.ingles = english

def ave(self):
self.average = (self.matematika + self.agham + self.ingles) / 3

def show(self):
self.ave()
print("Name: ", self.pangalan)
print("Math Grade: ", self.matematika)
print("Science Grade: ", self.agham)
print("English Grade: ", self.ingles)
if self.average >= 75:
self.status = "Passed"
else:
self.status = "Failed"
print("Average Grade: {} ({})".format(round(self.average,0), self.status))

print()
print("Student Average Grade Using Classes in Python")
print()
Name = str(input("Enter Name: "))
Math = float(input("Enter Math: "))
Science = float(input("Enter Science: "))
English = float(input("Enter English: "))
print()

stud = Students(Name, Math, Science, English)
stud.show()

Wednesday, July 28, 2021

Odd and Even Numbers in AngularJS

Classes, Objects and Properties in Python

Odd and Even Numbers in AngularJS

 In this article I would like to discuss how to write a program that AngularJS to check if the given number is odd or even numbers.

I am currently accepting programming work, IT projects, school and application development, programming projects, thesis and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me at the following email address for further details.  If you want to advertise on my website, kindly contact me also at my email address also. Thank you.

My email address is jakerpomperada@gmail.com and jakerpomperada@yahoo.com

My mobile number here in the Philippines is 09173084360.





Program Listing

<!-- index.htm

  Author   : Prof. Jake Rodriguez Pomperada, MAED-IT, MIT

  Date     : July 21, 2021  Wednesday  1:33 PM

  Place    : Bacolod City, Negros Occidental

  Websites : www.jakerpomperada.com and www.jakerpomperada.blogspot.com

  Email    : jakerpomperada@gmail.com

 -->

<html ng-app="mainApp">

<head>

<title>Odd and Even Numbers in AngularJS</title>

</head>

<style>

body {

font-family: arial;

font-size: 25px;

font-weight: bold;

}

</style>

<script type="text/javascript" src="angular.min.js">

</script>


<script type="text/javascript">


// AngularJS Controller Declaration

angular.module('mainApp', []).service('myService', function() {

  this.myFunc = function(x) {


    if (Number(x) % 2 === 0)

      return 'EVEN';

    else

      return 'ODD';

  };

}).controller('Odd_Even_Controller', function($scope, myService) {

  $scope.check = function(num) {

    $scope.myUserService = myService.myFunc(num);

  }


});

</script>


<div ng-app="mainApp" ng-controller="Odd_Even_Controller">

<form>

<table border="0" cellspacing=10>

<tr>Odd and Even Numbers in AngularJS</tr>

<tr>

  <td>Enter a Number </td>

<td><input type="number" ng-model="val_1" ng-init="val_1=0" ng-keyup="check(val_1)"/></td>

</tr>

<table>

</form>

<b>The number entered is {{val_1}} which is {{myUserService}} number(s). </b>

</div>

</body>

</html>




Classes, Objects, and Properties in Python

 A simple program that I wrote using Python programming language to show how to declare and use classes, objects, and propertines.

I am currently accepting programming work, IT projects, school and application development, programming projects, thesis and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me at the following email address for further details.  If you want to advertise on my website, kindly contact me also at my email address also. Thank you.

My email address is jakerpomperada@gmail.com and jakerpomperada@yahoo.com

My mobile number here in the Philippines is 09173084360.





Program Listing

# mod6_act1.py
# Author : Jake R. Pomperada

class Car:
color = "Red"
model = "Everest"
manufacturer = "Ford"

def __init__(self, kulay, modelo, tagagawa):
self.col = kulay
self.mod = modelo
self.man = tagagawa


car1 = Car("Blue", "Fortuner", "Ford")
car2 = Car("White", "mu-X", "Isuzu")
car3 = Car("Brown", "Terra", "Nissan")

print(f"Car color is {car1.color}, Model is {car1.model}, Manufacturer is {car1.manufacturer}")
print("=========After modifying the properties===========")
print(f"Car color is {car1.col}, Model is {car1.mod}, Manufacturer is {car1.man}")
print(f"Car color is {car2.col}, Model is {car2.mod}, Manufacturer is {car2.man}")
print(f"Car color is {car3.col}, Model is {car3.mod}, Manufacturer is {car3.man}")


Monday, July 26, 2021

Simple Interest in AngularJS

Simple Interest in AngularJS

 Machine Problem


Write a program  to ask the user to give principal amount, time, and rate to calculate the simple interest.   Use the following formula below.

Formula:

SI = (P * T * R) / 100

Where:

P = principal amount

T = time

R = rate

SI = simple interest

I am currently accepting programming work, IT projects, school and application development, programming projects, thesis and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me at the following email address for further details.  If you want to advertise on my website, kindly contact me also at my email address also. Thank you.

My email address is jakerpomperada@gmail.com and jakerpomperada@yahoo.com

My mobile number here in the Philippines is 09173084360.






Program Listing

<!-- index.htm
  Author   : Prof. Jake Rodriguez Pomperada, MAED-IT, MIT
  Date     : July 20, 2021  Tuesday   10:12 PM
  Place    : Bacolod City, Negros Occidental
  Websites : www.jakerpomperada.com and www.jakerpomperada.blogspot.com
  Email    : jakerpomperada@gmail.com
 -->
<html>
<head>
<title>Simple Interest in AngularJS</title>
</head>
<style>
body {
font-family: arial;
font-size: 25px;
font-weight: bold;
}
</style>
<script type="text/javascript" src="angular.min.js">
</script>


<div ng-app ng-init="principal_amt=0;time=0;interest_rate=0">
<form>
<table border="0" cellspacing=10>
<tr>Simple Interest in AngularJS</tr>
<tr>
<td>Enter Principal Amount </td>
<td><input type="number"  ng-model="principal_amt" ></td>
</tr>
<tr>
<td>Enter Time (ex. 1 for 1 year) </td>
<td><input type="number" ng-model="time" ></td>
</tr>
<tr>
<td>Enter Interest Rate </td>
<td><input type="number"  ng-model="interest_rate" ></td>
</tr>
<table>
</form>
<p>Simple Interest is PHP  {{ (principal_amt * time * interest_rate) / 100 | number : 2}}. </p> 
</div>
</body>
</html>

Sunday, July 25, 2021

Celsius To Fahrenheit in Visual Basic 6

Celsius To Fahrenheit in Visual Basic 6

 Machine Problem

Write a program that will ask the user to give temperature in Celsius and the program will convert it into Fahrenheit equivalent using Microsoft Visual Basic 6.

I am currently accepting programming work, IT projects, school and application development, programming projects, thesis and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me at the following email address for further details.  If you want to advertise on my website, kindly contact me also at my email address also. Thank you.

My email address is jakerpomperada@gmail.com and jakerpomperada@yahoo.com

My mobile number here in the Philippines is 09173084360.




Program Listing


Private Sub cmdQuit_Click()

End

End Sub


Private Sub cmdRefresh_Click()

txtcelsius.Text = 0

txtfahrenheit.Text = 32

End Sub


Private Sub txtcelsius_Change()

If txtcelsius.Text = "" Or IsNumeric(txtcelsius.Text) = False Then

MsgBox "Please enter a numeric value", vbInformation, "Reminder"

txtcelsius.SetFocus

Else

txtfahrenheit.Text = Format(Val(txtcelsius.Text) * (9 / 5) + 32, "##,##0.00")

End If

End Sub