Sunday, June 30, 2019

Legal Age Program Using Ternary Operator in Ruby

Design a program that will ask the user to give their age the program check if the age of the user is still a minor or already an adult using the ternary operator. The legal age here in the Philippines is 18 years old and above.

If you like my work please click the ads on my website to support my work. I will really appreciate your help. 

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


Program Listing

# legal.rb
# Author   : Jake Rodriguez Pomperada,BSCS,MAED-IT
# Date     : June 7, 2019   Friday  4:51 AM
# Address  : Bacolod City, Negros Occidental
# Tools    : Eclipse IDE and Ruby Version 2.6.3
# Location : Bacolod City, Negros Occidental  
# Website  : http://www.jakerpomperada.com
# Emails   : jakerpomperada@gmai.com and jakerpomperada@yahoo.com

puts "\n\n"
print "\tLegal Age Program Using Ternary Operator";
puts "\n\n"
print "\tTell me your name? ";
name = gets.chomp;
print "\tWhat is your age? ";
age = gets.chomp;
age = age.to_i;
puts("\n");
print "\t===== DISPLAY RESULT ====="
print "\n\n";

display_result = (age >= 18) ? "You are already an ADULT." : "You are still a MINOR." ; 

print("\tHello #{name.upcase}.\n");
print("\tAt the age of #{age} years old.\n\n")
print("\t#{display_result}");
print("\n\n");
print "\tEND OF PROGRAM";
print "\n\n";
 
 

Cube Numbers Using Until Loop Using Ruby

Here is a program that will ask the user a number and then it will list down the cube number equivalent using until loop statement in Ruby.

If you like my work please click the ads on my website to support my work. I will really appreciate your help. 

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


Program Listing

# cube.rb
# Author   : Jake Rodriguez Pomperada,BSCS,MAED-IT
# Date     : June 16, 2019   Sunday 8:59 PM
# Address  : Bacolod City, Negros Occidental
# Tools    : Eclipse IDE and Ruby Version 2.6.3
# Location : Bacolod City, Negros Occidental  
# Website  : http://www.jakerpomperada.com
# Emails   : jakerpomperada@gmai.com and jakerpomperada@yahoo.com
puts "\n\n"
print "\tCube Numbers Using Until Loop ";
puts "\n\n"
print("\t");

print("Give a number : ");   
num_val = gets.chomp   
num_val = num_val.to_i;

print("\n");
print("\tNumber \t Cube Number Equivalent");
print("\n\n");
index = 1;
until index >= num_val+1 
     print("\t");
     print(" #{index} \t\t  #{index**3}\n")
  index += 1;
end
print "\n";
print "\tEND OF PROGRAM";
print "\n\n";

Display Names in Reverse Order Using One-Dimensional Array in Ruby

A simple program that I wrote that will ask the user to give five names of the person that will be stored in a one-dimensional array and then the program will display the list of given names of the user in reverse order.

If you like my work please click the ads on my website to support my work. I will really appreciate your help. 

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


Program Listing

# sample3.rb
# Author   : Jake Rodriguez Pomperada,BSCS,MAED-IT
# Date     : June 30, 2019  Sunday  3:15 PM
# Address  : Bacolod City, Negros Occidental
# Tools    : Eclipse IDE and Ruby Version 2.6.3
# Location : Bacolod City, Negros Occidental  
# Website  : http://www.jakerpomperada.com
# Emails   : jakerpomperada@gmail.com and jakerpomperada@yahoo.com
puts "\n\n"
print "\tDisplay Names in Reverse Order Using One-Dimensional Array";
puts "\n\n"
name = []
puts "\tGive Five Names : "
5.times do |x|
name[x] = gets.chomp
end
puts("\n");
print "\t===== DISPLAY RESULT ====="
print "\n";


for i in 4.downto 0
  print("\n");
print("\t #{name[i].upcase}")
end
print "\n\n";
print "\tEND OF PROGRAM";

Grocery Product Display Using One-Dimensional Array in Ruby

A simple program that I wrote using a one-dimensional array in Ruby to display the product number and product name.

If you like my work please click the ads on my website to support my work. I will really appreciate your help. 

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


Program Listing

# sample1.rb
# Author   : Jake Rodriguez Pomperada,BSCS,MAED-IT
# Date     : June 30, 2019  Sunday  2:24 PM
# Address  : Bacolod City, Negros Occidental
# Tools    : Eclipse IDE and Ruby Version 2.6.3
# Location : Bacolod City, Negros Occidental  
# Website  : http://www.jakerpomperada.com
# Emails   : jakerpomperada@gmai.com and jakerpomperada@yahoo.com
puts "\n\n"
print "\tGrocery Product Display Using One-Dimensional Array";
puts "\n\n"
item_no = [1,2,3,4,5]
products = ['Coke','Lucky Me','Milo','Argentina','Nido']

print("\t");
print item_no[0] 
print("\t")
print products[0]
puts("\n");
print("\t")
print item_no[1] 
print("\t")
print products[1]
puts("\n");
print("\t")
print item_no[2] 
print("\t")
print products[2]
puts("\n");
print("\t")
print item_no[3] 
print("\t")
print products[3]
puts("\n");
print("\t")
print item_no[4] 
print("\t")
print products[4]
print "\n\n";
print "\tEND OF PROGRAM";



Menu Driven Temperature Program in Python


Write a menu-driven program that uses a function to convert the following temperatures Fahrenheit to Celsius & Kelvin, Celsius to Fahrenheit & Kelvin and Kelvin to Fahrenheit & Celsius. The program also has an exit program option in order for the user to quit the program.

If you like my work please click the ads on my website to support my work. I will really appreciate your help. 

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


Program Listing

# temperature.py
# Rollyn M. Moises and Jake R. Pomperada
# February 28, 2019    Thursday
# Bacolod City, Negros Occidental


def fah():
    print();
    F=int(input('\tEnter the temperature on Fahrenheit(F) : '));
    C=(F - 32) * 5/9;
    K=(F - 32) * 5/9 + 273.15;
    print();
    print("\tFahrenheit Value :",round(F,2));
    print("\tCelsius Value :",round(C,2));
    print("\tKelvin Value:",round(K,2));
    print();
    print("\tEND OF PROGRAM");

def cel():
    print();
    C=int(input('\tEnter the temperature on Celsius(C) : '));
    F=(C * 9/5) + 32;
    K=C + 273.15;
    print();
    print("\tFahrenheit Value :",round(F,2));
    print("\tCelsius Value :",round(C,2));
    print("\tKelvin Value:",round(K,2));
    print();
    print("\tEND OF PROGRAM");

def kel():
    print();
    K=int(input('\tEnter the temperature on Kelvin(K) : '));
    F=(K - 273.15) * 9/5 + 32;
    C=K - 273.15;
    print();
    print("\tFahrenheit Value :",round(F,2));
    print("\tCelsius Value :",round(C,2));
    print("\tKelvin Value:",round(K,2));
    print();
    print("\tEND OF PROGRAM");

print();
print("\t===== MAIN MENU =====");
print();
print("[1] Fahrenheit to Celsius & Kelvin");
print("[2] Celsius to Fahrenheit & Kelvin");
print("[3] Kelvin to Fahrenheit & Celsius");
print("[4] Exit Program");
print();
n=int(input('\tEnter the choice: '));
if n==1:
      fah()
elif n==2:
      cel()
elif n==3:
      kel()
elif n==4:
      exit()
else:
      print('Invalid options')


Odd and Even Number Checker Using a Function in Python


Write a program that will ask the user to give an integer number and then the program will check if the given number is odd or even using a function in Python programming language.

If you like my work please click the ads on my website to support my work. I will really appreciate your help. 

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


Program Listing

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


def is_odd_even(input_num):
    if input_num % 2 == 0:
        print();
        print("   ",input_num, "is EVEN number.");
    else:
        print();
        print("   ",input_num, "is ODD number.");


print();
print("\tOdd and Even Number Checker Using a Function");
print();
a = int(input("\tGive a Number : "));
is_odd_even(a);
print();
print("\tEND OF PROGRAM");



Factorial of a Number Using Functions in Python


Write a program that will ask the user to give a number and then the program will compute its factorial value of the given number and display the result on the screen. 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.


If you like my work please click the ads on my website to support my work. I will really appreciate your help. 

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


Program Listing

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


def factorial(number):
    solve_results = 1
    for i in range(2, number + 1):
        solve_results *= i
    return solve_results


def my_program():
  print();
  print("\t@==================================@")
  print("\t      Factorial of a Number     ")
  print("\t@==================================@")
  print();
  value = int(input("\tEnter a Number : "))
  print("");
  if value < 0:
    print("\tSorry, factorial does not exist for negative numbers")
  elif value == 0:
    print("\tThe factorial of 0 is 1")
  else:
    print("\tThe factorial of",value,"is",factorial(value))
  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()



Two Dimensional Arrays in Ruby

Here is a sample program to show you how to declare and use two-dimensional arrays in Ruby programming language. I find Ruby programming language very easy very similar to Python. I enjoy learning Ruby as an alternative programming language to teach computer programming in schools.

If you like my work please click the ads on my website to support my work. I will really appreciate your help. 

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


Program Listing

# demo1.rb
# Author   : Jake Rodriguez Pomperada,BSCS,MAED-IT
# Date     : June 29, 2019  Saturday  3:51 PM
# Address  : Bacolod City, Negros Occidental
# Tools    : Eclipse IDE and Ruby Version 2.6.3
# Location : Bacolod City, Negros Occidental  
# Website  : http://www.jakerpomperada.com
# Emails   : jakerpomperada@gmai.com and jakerpomperada@yahoo.com
puts "\n\n"
print "\tTwo Dimensional Array Example ";
puts "\n\n"
val_items = Array.new(5) { Array.new(0)}
sum = 0;
sum = sum.to_i;

5.times do |x|
  print "\tGive value in item no. #{x+1} : "
  val_items[x] = gets.chomp
  val_items[x]  = val_items[x].to_i;
end

puts("\n");
print "\t===== LIST OF GIVEN VALUES ====="
print "\n\n";
print("\t");
for i in val_items
print "" + i.to_s + " "
end

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

Login System Using Visual Basic 6 and MySQL

In this article, I would like to share with you the work of my friend, fellow software engineer and business partner Mr. Larry Dave Lacapag Emol he is a Visual Basic 6 Developer who wrote many applications in Visual Basic for 8 years already. You can also visit his website which contains many free source code in Visual Basic 6 free to download at the following web address https://davesterz.blogspot.com/

This program is a login system that has a backend database MySQL the code is very easy to follow and understand feel free to use in your own programming project.

If you like my work please click the ads on my website to support my work. I will really appreciate your help. 

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

toturial.sql

-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Jun 29, 2019 at 07:20 PM
-- Server version: 10.1.9-MariaDB
-- PHP Version: 5.6.15

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;

--
-- Database: `toturial`
--

-- --------------------------------------------------------

--
-- Table structure for table `tb_user`
--

CREATE TABLE `tb_user` (
  `ID` int(11) NOT NULL,
  `USERNAME` varchar(50) NOT NULL,
  `PASSWORD` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `tb_user`
--

INSERT INTO `tb_user` (`ID`, `USERNAME`, `PASSWORD`) VALUES
(1, 'admin', 'admin');

--
-- Indexes for dumped tables
--

--
-- Indexes for table `tb_user`
--
ALTER TABLE `tb_user`
  ADD PRIMARY KEY (`ID`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `tb_user`
--
ALTER TABLE `tb_user`
  MODIFY `ID` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;



Saturday, June 29, 2019

Sum of all Odd and Even Numbers in C

A very simple program that I wrote using the C Programming language to sum all the values of odd and even numbers.

If you like my work please click the ads on my website to support my work. I will really appreciate your help. 

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


Program Listing

#include <stdio.h>
 
int  main()
{
    int i, num, odd_sum = 0, even_sum = 0;
 
    printf("Enter the value of num\n");
    scanf("%d", &num);
    for (i = 1; i <= num; i++)
    {
        if (i % 2 == 0)
            even_sum = even_sum + i;
        else
            odd_sum = odd_sum + i;
    }
    printf("Sum of all odd numbers  = %d\n", odd_sum);
    printf("Sum of all even numbers = %d\n", even_sum);
}