Monday, February 25, 2019

Odd and Even Number Checker Using Function in Python

This is a simple program that I wrote using the function in Python to check if the given number is odd or even. I am still learning Python programming language before I am currently working on my new book on Python programming with co-author, a mentor in programming and best friend Rollyn Moises.



Sample Program Output


Program Listing


# odd_even.py
# Rollyn M. Moises and Jake R. Pomperada
# February 25, 2019    Tuesday
# Bacolod City, Negros Occidental


def odd_even(n):
    if n % 2 == 0:
        print("\tThe number %d is an EVEN." % n)
    else:
        print("\tThe number %d is an ODD." % n)


def my_program():
    print();
    print("\tOdd and Even Number Checker Using Function");
    print();
    a= int(input("\tGive a Number : "));
    display = a;
    print();
    odd_even(display);
    print();
    repeat = input('\tDo you want to continue ? (Y/N) : ')
    if repeat.upper() == "N":
        print()
        print("\tThank You For Using This Program.")
        print();
        print("\tEND OF PROGRAM");
        quit

    if repeat.upper() == "Y":
        my_program()


if __name__ == '__main__':

    my_program()









Leap Year Checker Using Function in Python

Presently learning how to program python for my book writing project and to spend my free time in a productive way.

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 in the following email address for further details.  If you want to advertise on my website kindly contact me also in my email address also. Thank you.
My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.

My telephone number at home here in Bacolod City, Negros Occidental Philippines is  +63 (034) 4335675.

Here in Bacolod I also accepting computer repair, networking and Arduino Project development at a very affordable price.

My personal website is http://www.jakerpomperada.com

Problem

Write a program that will ask the user to give the year and then
the program will check and determine if the given year by the user is a leap year or not using the function. 

The program also asks the user if the user will continue using the program or not. If the user chooses Y for yes the program will run again but if the user chooses N for no the program
will display a thankful message and return to the operating system.





Sample Program Output


Program Listing

# leap_year.py
# Jake R. Pomperada
# February 25, 2019    Tuesday
# Bacolod City, Negros Occidental


def leap_year(year):
    if year % 4 == 0 and year % 100 != 0:
        print("\tThe year %d is a Leap Year" % year)
    elif year % 100 == 0:
        print("\tThe year %d is not a Leap Year" % year)
    elif year % 400 == 0:
        print("\tThe year %d is a Leap Year" % year)
    else:
        print("\tThe year %d is not a Leap Year" % year)


def my_program():
    print();
    print("\tLeap Year Checker Using Function");
    print();
    a= int(input("\tGive a Year : "));
    display = a;
    print();
    leap_year(display);
    print();
    repeat = input('\tDo you want to continue ? (Y/N) : ')
    if repeat.upper() == "N":
        print()
        print("\tThank You For Using This Program.")
        print();
        print("\tEND OF PROGRAM");
        quit

    if repeat.upper() == "Y":
        my_program()


if __name__ == '__main__':
    my_program()






Tuesday, February 19, 2019

Average of Three Numbers in Java

In this article I would like to share with you a sample program that will ask the user to give three numbers and then the program will compute the average of the given three numbers by the user using Java as our 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 in the following email address for further details.  If you want to advertise on my website kindly contact me also in my email address also. Thank you.
My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.

My telephone number at home here in Bacolod City, Negros Occidental Philippines is  +63 (034) 4335675.

Here in Bacolod I also accepting computer repair, networking and Arduino Project development at a very affordable price.

My personal website is http://www.jakerpomperada.com



Sample Program Output


Program Listing

package average_numbers;
 import java.util.Scanner;

/**
 *Average_Numbers.java
 * Author : Mr. Jake R. Pomperada,MAED-IT
 * Date   : February 19, 2019   Tuesday
 * http://www.jakerpomperada.com
 * jakerpomperada@jakerpomperada.com 
 * jakerpomperada@gmail.com
 */
public class Average_Numbers {
   public static void main(String[] args) {
   int a=0,b=0,c=0;
   int average=0;

      Scanner input = new Scanner(System.in);
      System.out.println();
      System.out.print("\tAverage of Three Numbers");
      System.out.println("\n");
      System.out.print("\tGive First Value  : ");
      a = input.nextInt();
      System.out.print("\tGive Second Value : ");
      b = input.nextInt();
      System.out.print("\tGive Third Value  : ");
      c = input.nextInt();
      average = (a+b+c)/3;
      System.out.println();
      System.out.print("\tThe average is " + average + ".");
      System.out.println("\n");
      System.out.println("\tEnd of Program");
      System.out.println();
    }
}





Money Bill Denominator in Java

Here is a program that I wrote in Java to ask the amount of money from the user and then our program will  count how many one thousand, five hundred, two hundred, one hundred, fifty, twenty bills and ten, five and one peso coins based here in the Philippine currency.

 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 in the following email address for further details.  If you want to advertise on my website kindly contact me also in my email address also. Thank you.
My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.

My telephone number at home here in Bacolod City, Negros Occidental Philippines is  +63 (034) 4335675.

Here in Bacolod I also accepting computer repair, networking and Arduino Project development at a very affordable price.

My personal website is http://www.jakerpomperada.com



Sample Program Output


Program Listing

package money_denominator;

 import java.util.Scanner;

/**
 * Money_Denominator.java
 * Author : Mr. Jake R. Pomperada,MAED-IT
 * Date   : February 19, 2019   Tuesday
 * http://www.jakerpomperada.com
 * jakerpomperada@jakerpomperada.com 
 * jakerpomperada@gmail.com
 */
public class Money_Denominator {
 
   public static void main(String[] args) {
     
      int amount=0,thousand=0,five_hundreds=0,two_hundreds=0;
      int hundreds=0,fifty=0,twentys=0,tens=0,fives=0,ones=0;
      
      Scanner input = new Scanner(System.in);
      
      System.out.println();
      System.out.print("\tMoney Bill Denominator");
      System.out.println("\n");
      System.out.print("\tEnter an Amount : ");
      amount = input.nextInt();
      
      thousand = amount/1000;
      amount = amount%1000;
      
      five_hundreds = amount/500;
      amount = amount%500;
      
      two_hundreds = amount/200;
      amount = amount%200;
      
      hundreds = amount/100;
      amount = amount%100;
      
      fifty = amount/50;
      amount = amount%50;
      
      twentys = amount/20;
      amount = amount%20;
      
      tens = amount/10;
      amount = amount%10;
      
      fives = amount/5;
      amount = amount%5;
      
      ones = amount/1;
      amount = amount%1;

      System.out.print(" \n");
      System.out.print("\t===== Display Report =====");
      System.out.println("\n");
      System.out.print("\tNumber of 1000 Note(s)  : "   + thousand + "\n");
      System.out.print("\tNumber of 500 Note(s)   : "   + five_hundreds +  "\n");
      System.out.print("\tNumber of 200 Note(s)   : "   + two_hundreds  + "\n");
      System.out.print("\tNumber of 100 Note(s)   : "   + hundreds + "\n");
      System.out.print("\tNumber of 50 Note(s)    : "   + fifty  + "\n");
      System.out.print("\tNumber of 20 Note(s)    : "   + twentys + "\n");
      System.out.print("\tNumber of 10 Coin(s)    : "   + tens  + "\n");
      System.out.print("\tNumber of 5  Coin(s)    : "   + fives + "\n");
      System.out.print("\tNumber of 1  Coin(s)    : "   + ones + "\n");
      System.out.print("\n\n");
      System.out.print("\tEnd of Program");
      System.out.print("\n\n");  
  }
}  // End of Code  



Thursday, February 14, 2019

MULTIPLICATION TABLE USING FOR STATEMENT IN PYTHON

A simple multiplication program that I wrote in Python as a sample program for the book that I am working right now. I hope you will find my work useful.

 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 in the following email address for further details.  If you want to advertise on my website kindly contact me also in my email address also. Thank you.
My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.

My telephone number at home here in Bacolod City, Negros Occidental Philippines is  +63 (034) 4335675.

Here in Bacolod I also accepting computer repair, networking and Arduino Project development at a very affordable price.

My personal website is http://www.jakerpomperada.com




Sample Program Output


Program Listing

print();
print("\t\t\tMULTIPLICATION TABLE USING FOR STATEMENT");
print();
for x in range(1, 13):
   for y in range(1, 13):
     print("{:5}".format(x*y), end="")
   print()
print();
print("\t\t\t\t\tEND OF PROGRAM");


Positive and Negative Number Checker Using Switch in Python

A simple program that I wrote using Python to check if the given number is a positive or negative number.  The code is very easy to understand and use.  I wrote this code for my the future book that I am writing about python programming I am still a beginner and learner on Python.

  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 in the following email address for further details.  If you want to advertise on my website kindly contact me also in my email address also. Thank you.
My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.

My telephone number at home here in Bacolod City, Negros Occidental Philippines is  +63 (034) 4335675.

Here in Bacolod I also accepting computer repair, networking and Arduino Project development at a very affordable price.
My personal website is http://www.jakerpomperada.com



Sample Program Output

Program Listing

def pos_neg(x ):
    switcher = {
            0 : "is a Positive Number.",
             }
    return switcher.get(x,"is a Negative Number.")

print();
print("\tPositive and Negative Number Checker Using Switch");
print();
x= int(input("\tGive a number : "));
display = x;
print();
if (x >=0):
    x = 0
else:
    x =1
print("\tThe given number %d" %display,pos_neg(x));
print();
print("\tEND OF PROGRAM");




Tuesday, February 12, 2019

Two Dimensional Arrays of Mobile Numbers in Java

Here is a simple program that I wrote using Java two dimensional arrays to populate the list of mobile numbers. The code is very simple easy to understand.

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 in the following email address for further details.  If you want to advertise on my website kindly contact me also in my email address also. Thank you.
My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.

My telephone number at home here in Bacolod City, Negros Occidental Philippines is  +63 (034) 4335675.

Here in Bacolod I also accepting computer repair, networking and Arduino Project development at a very affordable price.
My personal website is http://www.jakerpomperada.com



Sample Program Output


Program Listing

package two_arrays;

class two_arrays {
public static void main(String args[])
{    
long [][] mobile_no = new long[3][2];
System.out.println();
System.out.println("Two Dimensional Arrays of Mobile Numbers");
System.out.println();
mobile_no[0][0] =221971362; 
mobile_no[0][1] =915521365;
mobile_no[1][0] =628088942; 
mobile_no[1][1] =259417206;
mobile_no[2][0] =530859708; 
mobile_no[2][1] =758310922;

for (int row = 0; row < mobile_no.length; row++) { 
        for (int col = 0; col < mobile_no[row].length; col++)
{
System.out.print("\t" + mobile_no[row][col]);
}
  System.out.println();    
}
 
System.out.println();
System.out.println("\tEND OF PROGRAM");
System.out.println();
}
}

Friday, February 8, 2019

Odd and Even Numbers Using For Loop Statement In Python

A very simple program that I wrote using Python as my programming language to ask the user to give a number and then the program will display the list of odd and even numbers 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 in the following email address for further details.  If you want to advertise on my website kindly contact me also in my email address also. Thank you.
My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.

My telephone number at home here in Bacolod City, Negros Occidental Philippines is  +63 (034) 4335675.

Here in Bacolod I also accepting computer repair, networking and Arduino Project development at a very affordable price.
My personal website is http://www.jakerpomperada.com



Sample Program Output


Program Listing

# Rollyn M. Moises and Jake R. Pomperada
# even_odd.py
# February 8, 2019  Friday
# Bacolod City, Negros Occidental
print();
print("\tOdd and Even Numbers Using For Loop Statement");
print();
value = int(input("\tGive a Number : "))
print();
print("\tList of EVEN Numbers")
print();
for a in range(value):
 if(a % 2 == 0):
     print("\t%d" % a, end=" ");
print("\n");
print('\t');
print("\tList ODD Numbers");
print();
for a in range(value):
     if (a % 2 != 0):
       print("\t%d" % a, end=" ");
print("\n");
print("\tEND OF PROGRAM");



Wednesday, February 6, 2019

POSITIVE AND NEGATIVE NUMBER CHECKER IN PYTHON

Here is a simple code that I wrote in Python to check for positive and negative number given by the user.

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 in the following email address for further details.  If you want to advertise on my website kindly contact me also in my email address also. Thank you.
My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.

My telephone number at home here in Bacolod City, Negros Occidental Philippines is  +63 (034) 4335675.

Here in Bacolod I also accepting computer repair, networking and Arduino Project development at a very affordable price.
My personal website is http://www.jakerpomperada.com

Sample Program Output


Program Listing

# February 5, 2019
# Bacolod City, Negros Occidental
print()
print("\tPOSITIVE AND NEGATIVE NUMBER CHECKER");
print()
num_value  = int(input('\tGive a Number :  '))
print()

if (num_value >=0) :
    print("\tThe given number %d is a Positive Number."% num_value)

if (num_value<0) :
    print("\tThe given number %d is a Negative Number." % num_value)

print();
print("\tEND OF PROGRAM");
print("\n\n");




Year Level Checker in Python

Here is a simple program that I wrote to check the year level of the student using Python.

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 in the following email address for further details.  If you want to advertise on my website kindly contact me also in my email address also. Thank you.
My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.

My telephone number at home here in Bacolod City, Negros Occidental Philippines is  +63 (034) 4335675.

Here in Bacolod I also accepting computer repair, networking and Arduino Project development at a very affordable price.
My personal website is http://www.jakerpomperada.com

Sample Program Output


Program Listing


# money_bills.py
# February 4, 2019
# Bacolod City, Negros Occidental
print();
print("\tYear Level Checker");
print();
year_level = int(input("\tWhat is your year level? "));
print();
if (year_level == 1) :
  print("\tThe given year level is ",year_level,'.');
  print();
  print("\tYou are belong to Freshmen.");

if (year_level == 2) :
  print("\tThe given year level is ",year_level,'.');
  print();
  print("\tYou are belong to Sophomore.");

if (year_level == 3) :
  print("\tThe given year level is " ,year_level,'.');
  print();
  print("\tYou are belong to Juniors.");

if (year_level == 4) :
  print("\tThe given year level is " ,year_level,'.');
  print();
  print("\tYou are belong to Seniors.");
print();
print("\tEND OF PROGRAM");