Tuesday, June 29, 2021

Grade Solver in PHP

 I simple grade solver using PHP programming language to solve the grade the average of the students.

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.php

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>Grade Solver in PHP</title>

</head>

<style type="text/css">

  body {

    font-family: arial;

    size:14px;

  };

</style>

<body>

  <h3>Grade Solver in PHP </h3>

  <p> Created By Prof. Jake Rodriguez Pomperada, MAED-IT, MIT </p>

<form action="grade_result.php" method="post">

<table width="301" border="1">

  <tr>

    <td width="141">Enter Prelim:</td>

    <td width="144"><label>

      <input type="text" name="txtpre" id="textfield" />

    </label></td>

  </tr>

  <tr>

    <td>Enter Midterm:</td>

    <td><label>

      <input type="text" name="txtmid" id="textfield2" />

    </label></td>

  </tr>

  <tr>

    <td>Enter Semifinal:</td>

    <td><label>

      <input type="text" name="txtsem" id="textfield3" />

    </label></td>

  </tr>

  <tr>

    <td>Enter Final:</td>

    <td><label>

      <input type="text" name="txtfin" id="textfield4" />

    </label></td>

  </tr>

  <tr>

    <td><label>

      <input type="submit" name="submit" id="button" value="Compute" />

    </label></td>

    <td><label>

      <input type="reset" name="clear" id="button2" value="Clear" />

    </label></td>

  </tr>

</table>

<p>&nbsp;</p>

</form>

</body>

</html>


grade_result.php

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Grade Solver</title>
</head>

<body>
  <style type="text/css">
  body {
    font-family: arial;
    size:14px;
  };
</style>
<?php
error_reporting(0);
$pre = $_POST['txtpre'];
$mid = $_POST['txtpre']; 
$sem = $_POST['txtsem'];
$fin = $_POST['txtfin'];

$avg=($pre + $mid + $sem + $fin)/4;

if ($avg <=75)
{
$remarks="POOR";
}
else if ($avg<=80)
{
$remarks="Needs Improvements";
}
else if ($avg<=85)
{
$remarks="GOOD";
}
else if ($avg<=90)
{
$remarks="Excellent";
}
else 
{
$remarks="Outstanding";
}
?>

<h3>Grade Results </h3>
<table width="348" border="1">
  <tr>
    <td width="174">Prelim Grade:</td>
    <td width="158"><?php echo $pre; ?></td>
  </tr>
  <tr>
    <td>Midterm Grade:</td>
    <td><?php echo $mid; ?></td>
  </tr>
  <tr>
    <td>Semi-Final Grade:</td>
    <td><?php echo $sem; ?></td>
  </tr>
  <tr>
    <td>Final Grade:</td>
    <td><?php echo $fin; ?></td>
  </tr>
  <tr>
    <td>Your Average is:</td>
    <td><?php echo $avg; ?></td>
  </tr>
  <tr>
    <td>Your Remarks is:</td>
    <td><?php echo $remarks; ?></td>
  </tr>
</table>
</body>
</html>

Monday, June 28, 2021

Student Grading System in C++ Using OOP Approach

Student Grading System in C++ Using OOP Approach

 A simple student grading system in C++ using Object Oriented Approach 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 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

// Grading_System.cpp

// Jake Rodriguez Pompeada, MAED-IT, MIT

// www.jakerpomperada.com and www.jakerpomperada.blogspot.com

// jakerpomperada@gmail.com


#include <iostream>

#include <iomanip>

#include <cmath>

#include <string>


#define EXIT_IF(cnd, msg) if(cnd){std::cerr << msg; exit(1);}


class Grader

{

public:

void run();

private:

std::string get_performance(double grade);

};


void Grader::run()

{

constexpr int num_grades = 5;

int num_students = 0, student, grade;

double sum, total_sum = 0.0;


    std::cout << "\n\n";

std::cout << "\tStudent Grading System in C++ Using OOP Approach";

std::cout << "\n\n";

std::cout << "Number of students in the class? ";

std::cin >> num_students;

std::cin.ignore(255, '\n');

EXIT_IF(num_students < 0, "Invalid Input: Please enter a nonnegative integer.");

for (student = 0; student < num_students; ++student)

{

sum = 0.0;

for (grade = 0; grade < num_grades; ++grade)

{

std::cout << "Grade of Student #" << student + 1 << " in Subject " << grade + 1 << ": ";

int tmp;

std::cin >> tmp;

EXIT_IF(tmp < 0, "Invalid Input: Please enter a nonnegative integer.");

sum += tmp;

}

double avg = std::round(sum / num_grades);

std::cout << "\n\n";

std::cout << "Average of Student " << student + 1 << " is : " << avg << "\n";

total_sum += avg;

}

double class_average = total_sum / num_students;

std::cout << std::fixed << std::setprecision(2) <<

"Class Average Grade is : " << class_average << "\n";

std::cout << "Class Performance is " << get_performance(class_average) << "\n";

}


std::string Grader::get_performance(double grade)

{

if (grade < 70)

return "Poor";

else if(grade <= 74)

return "For Improvement";

else if (grade <= 80)

return "Good";

else if (grade <= 90)

return "Very good";

else

return "Excellent";

}


int main()

{

Grader grader;


grader.run();

}



Sunday, June 27, 2021

Simple Payroll Program in C

SIMPLE PAYROLL PROGRAM IN C

 

Machine Problem in C

Write and design a payroll program that will ask the user how many days an employee work in the company and then the salary rate per day. In addition, the program also will ask the user the SSS, PAG-IBIG, BIR and PHILHEALTH contributions. The payroll program will compute the gross salary, total deductions, and net salary and display the result 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

/* simple_payroll_program_in_c.c

   Author   : Jake Rodriguez Pomperada,BSCS,MAED-IT, MIT

   Date     : June 27, 2021  9:49 AM  Sunday

   Location : Bacolod City, Negros Occidental

   Tool     : Codeblocks

   Website  : http://www.jakerpomperada.com and http://www.jakerpomperada.blogpsot.com

   Email    : jakerpomperada@gmail.com */


#include <stdio.h>


int main()

{

   float days=0,rate=0.00,solve_gross=0.00;

   float sss=0.00,pag_ibig=0.00,bir=0.00;

   float philhealth=0.00,solve_net_salary=0.00;

   float total_deductions=0.00;


   system("COLOR F0");

   printf("\n\n");

   printf("\tSIMPLE PAYROLL PROGRAM IN C");

   printf("\n\n");

   printf("\tHow Many Days Work : ");

   scanf("%f",&days);

   printf("\n");

   printf("\tSalary Per Day     : PHP ");

   scanf("%f",&rate);

   printf("\n\n");


   /* Solving Gross Salary Here */


   solve_gross = (days * rate);


   printf("\tGross Salary            : PHP %.2f ",solve_gross);

   printf("\n\n");

   printf("\tSSS Contribution        : PHP ");

   scanf("%f", &sss);

   printf("\tPAG-IBIG Contribution   : PHP ");

   scanf("%f",&pag_ibig);

   printf("\tBIR Contribution        : PHP ");

   scanf("%f",&bir);

   printf("\tPHILHEALTH Contribution : PHP ");

   scanf("%f",&philhealth);


    /* Solving Total Deductions and Net Salary Here */


    total_deductions = (sss+pag_ibig+bir+philhealth);

    solve_net_salary = (solve_gross - total_deductions);


    printf("\n\n");

    printf("\tDisplay Payroll Results");

    printf("\n\n");

    printf("\tGross Salary     : PHP %.2f\n",solve_gross);

    printf("\tTotal Deductions : PHP %.2f\n",total_deductions);

    printf("\n\n");

    printf("\tNet Salary       : PHP %.2f",solve_net_salary);

  printf("\n\n\n");

    printf("\tEND OF PROGRAM");

    printf("\n\n");

    }


Restaurant Reservation System in Python

Restaurant Reservation System in Python

Write and develop a small restaurant reservation program. The application offers different reservation rate for adults and children using Python 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

import os import sys from pathlib import Path


class menu:
def __init__(self, choice):
self.choice = choice
if choice == "A":
count = 0
file = open("reservation.txt")
lines = file.readlines()[1:]
file.close()
for line in lines:
count += 1

if count == 0:
print("There are no reservations!!")
print()
else:
file = open("reservation.txt", "r")
print(file.read())
file.close()

elif choice == "B":
with open("reservation.txt", "r") as file:
for last_line in file:
pass

if last_line[0] == "#":
num = 1
else:
num = int(last_line[0]) + 1

name = input("Enter Name: ")
date = input("Enter Date: ")
time = input("Enter Time: ")
adults = int(input("No. of Adults: "))
children = int(input("No. of Children: "))
file = open("reservation.txt", "a")
file.write(f"{num}\t\t\t{name}\t\t\t{date}\t\t\t{time}\t\t\t{adults}\t\t\t{children}\n")
file.close()
print()

elif choice == "C":
resnum = input("Enter Reservation number: ")
file1 = open("reservation.txt", "r")
lines = file1.readlines()
file1.close()
file2 = open("reservation.txt", "w")

for line in lines:
if not line.startswith(resnum):
file2.write(line)
file2.close()

elif choice == "D":
adults, children, total_adults, total_children, total = 0, 0, 0, 0, 0
file = open("reservation.txt", "r")
list_of_lists=[]
report = ""
i = 0

for line in file:
i += 1
if i > 1:

stripped_line = line.strip()
line_list = stripped_line.split("\t\t\t")
adults += int(line_list[4])
children += int(line_list[5])
subtotal = (int(line_list[4]) * 500) + (int(line_list[5]) * 300)
total += subtotal
line_list.append(str(subtotal))
report += f"{line_list[0]}\t\t\t{line_list[2]}\t\t\t{line_list[3]}\t\t\t" \
f"{line_list[1]}\t\t\t{line_list[4]}\t\t\t{line_list[5]}\t\t\t{line_list[6]}\n"
file.close()

print()
print()
print(" REPORT")
print()
print("#\t\t\tDate\t\t\t\tTime\t\t\t\tName\t\t\t\tAdults\t\t\tChildren\t\tSubtotal")
print(report)
print("Total Number of Adults: ", adults)
print("Total Number of Children: ", children)
print("Grand Total: PHP ", total)
print("---------------------------------------------------------------- nothing follows "
"----------------------------------------------------------------")
print()
print()

elif choice == "E":
import sys
sys.exit("Thank you!")

else:
print("Invalid response. Please try again.")


while True:
try:
file = open("reservation.txt", "r")
except FileNotFoundError:
file = open("reservation.txt", "w+")
file.write("#\t\t\tName\t\t\t Date\t\t\t Time\t\t\t Adults\t\t\tChildren\n")
file.close()

print("RESTAURANT RESERVATION SYSTEM")
print("System Menu:")
print("A. View all Reservations\tB. Make Reservation")
print("C. Delete Reservation\t\tD. Generate Report")
print("E. Exit\n")

selection_menu = input('Enter selection: ').upper()
menu(selection_menu)


Saturday, June 26, 2021

Body Mass Index in Python

Body Mass Index in Python

 
A simple program  that I wrote to compute the body mass index using Python 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

# Body_Mass_Index.py
# Author : Jake Rodriguez Pomperada, MAED-IT, MIT
# Python
# www.jakerpomperada.com and www.jakerpomperada.blogspot.com
# jakerpomperada@gmail.com
# Bacolod City, Negros Occidental

print("===========================")
print(" Body Mass Index in Python ")
print("===========================")
print()

hf = float(input("Enter your height in feet: "))
hi = float(input("Enter your height in inches: "))

wkg = float(input("Enter you weight in kilograms: "))
hm = ((hf*30.48)+(hi*2.54))/100
bmi = wkg/(hm*hm)

print()
print("Your Body Mass Index is %.2f" %(bmi))
print()
print("End of Program")

Simple Payroll in Python

Simple Payroll in Python

 I wrote this simple payroll program using Python programming language I hope you will like it.

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

# Simple_Payroll.py
# Author : Jake Rodriguez Pomperada, MAED-IT, MIT
# Python
# www.jakerpomperada.com and www.jakerpomperada.blogspot.com
# jakerpomperada@gmail.com
# Bacolod City, Negros Occidental

print("===========================")
print(" Simple Payroll in Python ")
print("===========================")
print()
name = str(input("Enter Employee Name: "))
hr = int(input("Enter hours rendered: "))
rate = int(input("Enter rate per hour: "))
gsis = int(input("GSIS Premium: "))
ph = int(input("PhilHealth: "))
loan = int(input("Housing Loan: "))
tax = int(input("Tax Rate: "))

gross = hr*rate
deduc = gsis+ph+loan+(gross*(tax/100))
net = gross - deduc

print("===========================")
print("Gross Salary is %.2f" %(gross))
print("Total Deduction is %.2f" %(deduc))
print("Net Salary is %.2f" %(net))

Friday, June 25, 2021

Gender Checker in Modern C++

 Machine Problem in C++

Write a program that will ask the user to input a character “m” or “f” and  then it will display “Hello Sir. You are a Male ”  if the input is “f” otherwise “Hello Madam. You are a Female”. Use if-else statement.

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

gender.cpp

// gender.cpp

// Prof. Jake Rodriguez Pomperada, MAED-IT, MIT

// www.jakerpomperada.com  www.jakerpomperada.blogspot.com

// jakerpomperada@gmail.com

// Bacolod City, Negros Occidental

// June 24, 2021  Thursday  9:41 PM


#include <iostream>


int main(int argc, char **argv)

{

    char gender;

    std::cout <<"\tGender Checker in Modern C++";

    std::cout <<"\n\n";

    std::cout << "Enter the gender(m or f): ";

    std::cin >> gender;

    std::cout <<"\n\n";

    if (gender == 'm' || gender == 'M')

        std::cout << "Hello Sir. You are a Male.\n";

    else if (gender == 'f' || gender == 'F')

        std::cout << "Hello Madam. You are a Female.";

    else

        std::cout << "Invalid input.\n";

}


Wednesday, June 23, 2021

Bakit Sikat ang Python Programming Language Dito sa Philippines

Salary Computation in Python

Salary Computation in Python

 Machine Problem Using Module in Python


1. Create a Salary Computation App

2. Create 3 Modules for this app

3. The first module is GrossSalary.py will handle the function 

   for computing the gross salary.

4. The second module is SalaryDeductions.py will handle the function 

   for computing the deductions

5. The last module NetSalary.py will be responsible for computing the net salary.

6. The user will input the following (Name, Hour, Loan, Health Insurance).

7. Tax(12% of the gross salary) and Rate(500/hr) is fixed

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

GrossSalary.py

from SalaryDeductions import tax, rate, TotalDeductions
from NetSalary import net

name = str(input("Enter Name: "))
hour = int(input("Hour: "))
gross = rate(hour)

print()
print("Gross Salary:", gross)

print()
print("Tax:", tax(gross))
loan = float(input("Loan: "))
insurance = float(input("Insurance: "))
deductions = TotalDeductions(tax(gross), insurance, loan)
print()

print("Total Deduction: ", deductions)
print()
print("Net Salary: ", net(gross, deductions))

NetSalary.py
def net(gross, deductions):
return gross - deductions

SalaryDeductions.py
def tax(gross):
return gross * 0.12


def rate(hour):
return 500 * hour


def TotalDeductions(tax2, insurance, loan):
return tax2 + insurance + loan



Random Name Generator Using Python

 


Machine Problem 


Random Module in Python

1. Create a  Random Name Generator App 

2. Create 3 lists for first name, middle name, and last name with 10 items per list 

3. The application will ask the user to generate a new name.

4. If yes, use a random number between 0 - 9 to randomly select items in the lists 

5. Display the generated name “Congratulations! 

Your new name is ________ 

6. If No, display the word “Thank you! ” and display all the names that user generated.

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

import random

first = ["Kai", "Hunter", "Luca", "Quinn", "River", "Skylar", "Hayden", "Riley", "Reese", "Jude"]
middle = ["Abbot", "Griffith", "Maxfield", "Rufus", "Eva", "Emma", "Olivia", "Sims", "Tan", "Ovilda"]
last = ["James", "Doha", "Harden", "Jordan", "Bryant", "Williams", "Simmons", "Imbid", "George", "Leonard"]
namebank = []
while True:
name = input("Do you want to generate a new name? [y/n]: ")
if name.upper() == "Y":
rand = random.randint(0, 4)
randname = first[rand] + " " + middle[rand] + " " + last[rand]
namebank.append(randname)
print(f"Your new name is {randname}\n")
continue
elif name.upper() == "N":
print("Thank you!")
print("List of generated names:")
for x in namebank:
print(f"{x}")
break


Tuesday, June 22, 2021

replace noun and adjectives in a Poem in Python

Replace Noun and Adjectives in a Poem in Python

 A simple program which allows the user to replace nouns and adjectives in a Poem in Python 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

# Replace Noun and Adjectives in a Poem
# Jake Rodriguez Pomperada, MAED-IT, MIT
# www.jakerpomperada.com and www.jakerpomperada.blogspot.com
# jakerpomperada@gmail.com
# Bacolod City, Negros Occidental

noun1 = str(input("Input the first noun: "))
noun2 = str(input("Input the second noun: "))
adj1 = str(input("Input the first adjective: "))
adj2 = str(input("Input the second adjective: "))

poem = "Up there on the mountain road, the fireworks blistered and subsided."
reps = "Up there on the {} {}, the fireworks {} and {}."
reps = reps.format(noun1.upper(), noun2.upper(), adj1.upper(), adj2.upper())
print("Original poem: ", poem)
print("Result: ", reps)