Friday, January 28, 2022

Addition of Two Numbers Using GUI in Python

 A simple program to ask the user to give two numbers and then the program will compute the sum of two numbers using a graphical user interface 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 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.


Please subscribe to my channel  https://www.youtube.com/channel/UCOs-lpOoIeJoh6gpJthPoGg




Program Listing


from tkinter import *

root = Tk()
root.title("Addition of Two Numbers Using GUI in Python")
width = 600
height = 300
screen_width = root.winfo_screenwidth()
screen_height = root.winfo_screenheight()
x = (screen_width/2) - (width/2)
y = (screen_height/2) - (height/2)
root.geometry("%dx%d+%d+%d" % (width, height, x, y))
root.resizable(False,False)

#==============================METHODS========================================
def add():
if not num1.get() and not num2.get():
print("Please enter a number")
else:
res=int(num1.get())+int(num2.get())
lbl_text.config(text = "The answer is %d" % (res))
num1.set=""
num2.set=""

#==============================FRAMES=========================================
Top = Frame(root, bd=2, relief=RIDGE)
Top.pack(side=TOP, fill=X)
Form = Frame(root, height=200)
Form.pack(side=TOP, pady=20)

#==============================LABELS=========================================
lbl_title = Label(Top, text = "Addition of Two Numbers Using GUI in Python", font=('arial', 16))
lbl_title.pack(fill=X)
lbl_num1 = Label(Form, text = "Enter First Value:", font=('arial', 14), bd=15)
lbl_num1.grid(row=0, sticky="e")
lbl_num2 = Label(Form, text = "Enter Second Value:", font=('arial', 14), bd=15)
lbl_num2.grid(row=1, sticky="e")
lbl_text = Label(Form)
lbl_text.grid(row=2, columnspan=2)

#==============================ENTRY WIDGETS==================================
num1 = Entry(Form, font=(14))
num1.grid(row=0, column=1)
num2 = Entry(Form, font=(14))
num2.grid(row=1, column=1)

#==============================BUTTON WIDGETS=================================
btn_calculate = Button(Form, text="Add", width=45, command=add)
btn_calculate.grid(pady=25, row=3, columnspan=2)


root.mainloop()




Graphical User Interface in Python Using Tkinter

Graphical User Interface in Python Using Tkinter

 A simple program to demonstrate how to create a graphical user interface using Tkinter 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 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.


Please subscribe to my channel  https://www.youtube.com/channel/UCOs-lpOoIeJoh6gpJthPoGg





Program Listing


from tkinter import *

root = Tk()

root.geometry("600x300")
root.title("Graphical User Interface in Python Using Tkinter")
root.resizable(False,False)
root.mainloop()

Wednesday, January 26, 2022

Largest of Five Numbers in C++

 A program that will ask the user to give five numbers and then the program will determine which of the five numbers has the largest numerical value using a C++ 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.


Please subscribe to my channel  https://www.youtube.com/channel/UCOs-lpOoIeJoh6gpJthPoGg






Program Listing

// minmax_element #include <iostream> // std::cout #include <algorithm> // std::minmax_element #include <array> // std::array int main () { int a=0,b=0,c=0,d=0,e=0; std::cout <<"\n\n"; std::cout <<"\tLargest of Five Numbers in C++"; std::cout <<"\n\n"; std::cout << "\tGive five numbers : "; std::cin >> a >> b >> c >> d >> e; std::array<int,5> foo {a,b,c,d,e}; auto result = std::minmax_element (foo.begin(),foo.end()); std::cout <<"\n\n"; std::cout << "\tThe Largest Number : " << *result.second; std::cout <<"\n\n"; std::cout << "\tEnd of Program"; std::cout <<"\n\n"; return 0; }

Print 1 To 10 Using Do While Statement in C

Print 1 To 10 Using Do While Statement in C

 A simple program that will print 1 to 10 using do while statement using  C 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.


Please subscribe to my channel  https://www.youtube.com/channel/UCOs-lpOoIeJoh6gpJthPoGg





Program Listing

#include <stdio.h> int main() { int a=1; printf("\n\n"); printf("\tPrint 1 To 10 Using Do While Statement in C"); printf("\n\n"); printf("\t"); do { printf("%4d",a); a++; } while(a<=10); printf("\n\n"); printf("\tEnd of Program"); printf("\n\n"); }

Print 1 To 10 Using Do While Statement in C++

Print 1 To 10 Using Do While Statement in C++

 A simple program to print 1 to 10 using do-while loop statement using a C++ 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.


Please subscribe to my channel  https://www.youtube.com/channel/UCOs-lpOoIeJoh6gpJthPoGg





Program Listing

#include <iostream> int a=0; int main(){ a=1; std::cout <<"\n\n"; std::cout << "\tPrint 1 To 10 Using Do While Statement in C++"; std::cout <<"\n\n"; std::cout <<"\t"; do { std::cout << " " << a << " "; a++; } while (a<=10); std::cout <<"\n\n"; std::cout << "\tEnd of Program"; std::cout <<"\n\n"; }

Tuesday, January 25, 2022

Prime Numbers in PHP

Prime Numbers in PHP

 A simple program to ask the user to give a number and then it will display if the given number is a prime number or not using PHP 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.


Please subscribe to my channel  https://www.youtube.com/channel/UCOs-lpOoIeJoh6gpJthPoGg




Program Listing

index.php

<?php if (isset($_POST["txtNumber"])) { $MyNum = $_POST["txtNumber"]; $n = 0; for ($i = 2; $i < $MyNum; $i++) { if ($MyNum % $i == 0) { $n++; break; } } if ($n == 0) { $output = $MyNum . " is a prime number."; } else { $output = $MyNum . " is not a prime number."; } } ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Prime Numbers in PHP</title> <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet"> </head> <body style="font-family:'Lucida Sans', sans-serif;"> <main class="container d-flex justify-content-center align-items-center" style="min-height: 100vh;"> <div class="card p-3"> <div class="card-body text-center"> <div class="alert alert-primary mt-2" role="alert"> <h2 class="mb-2 text-uppercase">Prime Numbers in PHP</h2> <p class="mb-0">Created By:</p> <h5 class="lh-1">&#187; Jake R. Pomperada, MAED-IT, MIT &#171;</h5> </div> <form class="my-3" action="" method="POST"> <div class="mb-1"> <label for="txtNumber" class="form-label">Enter a number</label> <input type="text" class="form-control form-control-sm" name="txtNumber" id="txtNumber"> </div> <button type="button" class="btn btn-primary btn-sm w-100">Submit</button> </form> <?php if (isset($output)) { echo '<div class="alert alert-primary mt-2" role="alert"> '.$output.' </div>'; } ?> </div> </div> </ma> </body> </html>

Average Student Grades Using For Loop and Arrays in C++

Average Student Grades Using For Loop and Arrays in C++

 A simple program to ask the user to give five grades of the students and then the program will compute the average grade of the student using a C++ 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.


Please subscribe to my channel  https://www.youtube.com/channel/UCOs-lpOoIeJoh6gpJthPoGg





Program Listing

grades.cpp

#include <iostream> #include <numeric> #include <array> constexpr int NumGrades = 5; int main() { std::array<int, NumGrades> grades; std::cout <<"\n\n"; std::cout << "\tAverage Student Grades Using For Loop and Arrays in C++"; std::cout <<"\n\n"; for (int i = 0; i < NumGrades; ++i) { std::cout << "\tEnter Student Grade No. " << i+1 << " : "; std::cin >> grades[i]; } auto sum_grades = std::accumulate(grades.cbegin(), grades.cend(), 0); auto avg_grade = sum_grades / NumGrades; std::cout <<"\n\n"; std::cout << "\tThe Average Student Grades : " << avg_grade; std::cout <<"\n\n"; std::cout << "\tEnd of Program"; std::cout <<"\n\n"; }


Monday, January 24, 2022

Student Average Grade Using For Loop, and Arrays in C

Student Average Grade Using For Loop, and Arrays in C

 A simple program to ask the user to give five grades and then the program will compute the average grade of the students using for loop statements and arrays in the c 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.


Please subscribe to my channel  https://www.youtube.com/channel/UCOs-lpOoIeJoh6gpJthPoGg





Program Listing

#include <stdio.h> #define NUM_GRADES 5 int accumulate(int grades[]) { int sum = 0; for (int i = 0; i < NUM_GRADES; ++i) { sum += grades[i]; } return sum; } int main() { int grades[ NUM_GRADES ] = { 0 }; printf("\n\n"); printf("\tStudent Average Grade Using For Loop, and Arrays in C"); printf("\n\n"); for (int i = 0; i < NUM_GRADES; ++i) { printf("\tEnter grade #%d: ", i+1); scanf("%d", &grades[i]); } int sum_grades = accumulate(grades); int avg_grade = sum_grades / NUM_GRADES; printf("\tThe Average Grade: %d", avg_grade); return 0; }


Sunday, January 23, 2022

Reverse a Number Using ng-app in AngularJS

Reverse a Number Using ng-app in AngularJS

 Machine Problem

Write a program that uses ng-app directive that will ask the user to give a number and then the program will display the original, and reverse arrangement of the given number 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.


Please subscribe to my channel  https://www.youtube.com/channel/UCOs-lpOoIeJoh6gpJthPoGg





Program Listing

<!-- index.htm Author : Prof. Jake Rodriguez Pomperada, MAED-IT, MIT Date : July 26, 2021 Monday 1:08 PM Place : Bacolod City, Negros Occidental Websites : www.jakerpomperada.com and www.jakerpomperada.blogspot.com Email : jakerpomperada@gmail.com --> <html> <head> <title>Reverse a Number Using ng-app in AngularJS</title> </head> <style> body { font-family: "arial"; font-style: bold; font-size: 18px; } </style> <script type="text/javascript" src="angular.min.js"></script> <body><br> <h3>Reverse a Number Using ng-app in AngularJS</h3> <body> <div ng-app="myApp" ng-controller="myController"> Give a Number &nbsp;&nbsp;<input type="number" ng-model="val_number" /> <br/><br> <button ng-click="Reverse_Number()" title="Click here to reverse the given number.">Ok</button> <br><br> {{original_number}} <br/><br> {{reverse_number}} </div> <script> var ngApp = angular.module('myApp', []); ngApp.controller('myController', function ($scope) { $scope.Reverse_Number=function() { var a,b,temp=0,reverse_number=0; var original_number=0, display=0; display = $scope.val_number; b=$scope.val_number; while($scope.val_number>0) { a=$scope.val_number%10; $scope.val_number=parseInt($scope.val_number/10); temp=temp*10+a; } $scope.original_number ="The original number is " + display +".";; $scope.reverse_number ="The reverse number is " + temp +"."; } }); </script> <br> </body> </html> </body> </html>


Largest of Three Numbers in Python

Largest of Three Numbers in Python

A program asks the user to give three numbers and then the program will check which of the three numbers is the largest number 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 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.


Please subscribe to my channel  https://www.youtube.com/channel/UCOs-lpOoIeJoh6gpJthPoGg






Program Listing


# To find the largest of three numbers

print()
print("\tLargest of Three Numbers in Python");
print()

# take inputs
num1 = int(input('\tEnter first number: '))
num2 = int(input('\tEnter second number: '))
num3 = int(input('\tEnter third number: '))

# find largest numbers
if (num1 >= num2) and (num1 >= num3):
largest = num1
elif (num2 >= num1) and (num2 >= num3):
largest = num2
else:
largest = num3

# display result
print();
print('\tThe largest number = ', largest)
print();
print("\tEND OF PROGRAM");
print();

Saturday, January 22, 2022

Login Error in Computer Programming Using C++

ARNOLD SCHWARZENEGGER Involved sa isang Car Accident

Prime Number in C

 A simple program asks the user to give a number and then the program will check if the given number is a prime number or not using a c 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.


Please subscribe to my channel  https://www.youtube.com/channel/UCOs-lpOoIeJoh6gpJthPoGg






Program Listing

#include <stdio.h> int main() { int a=0,i=0,flag=0; printf("\n\n"); printf("\tGive a number: "); scanf("%d",&a); printf("\n"); flag=0; for(i=2;i <= a/2;i++) { if(a%i == 0) { flag=1; break; } } if(flag==0) printf("\tThe given number %d is a Prime Number.",a); else printf("\tThe given number %d is Not a Prime Number.",a); printf("\n\n"); printf("\tEnd of Program"); printf("\n"); return 0; }

Friday, January 21, 2022

Arrays in PHP

Arrays in PHP

 A simple program to demonstrate arrays in PHP 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.


Please subscribe to my channel  https://www.youtube.com/channel/UCOs-lpOoIeJoh6gpJthPoGg






Program Listing


<?php print("Arrays in PHP"); echo "<br>"; $square = array('one' => 'one', 'two' => 'four', 'three' => 'nine'); echo "The square of 1 is {$square['one']}."; echo "<br>"; echo "The square of 2 is " . $square['two'] . "."; echo "<br>"; echo "The square of 3 is " . $square['three'] . "."; ?>

String Concatenation in PHP

String Concatenation in PHP

 A simple program to demonstrate string concatenation in PHP 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.


Please subscribe to my channel  https://www.youtube.com/channel/UCOs-lpOoIeJoh6gpJthPoGg





Program Listing


<?php echo "String Concatenation in PHP"; echo "<br><br>"; $title = "PHP "; $title .= " Programming "; $title .= " Language"; echo $title; ?>



Comments in PHP

Comments in PHP

 A simple article that shows the different types of comments in the PHP 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.


Please subscribe to my channel  https://www.youtube.com/channel/UCOs-lpOoIeJoh6gpJthPoGg




Program Listing


<?php print("Comments in PHP"); echo "<br><br>"; echo "line 1\n"; // comment1 /* comment 2 another line of comment 2*/ echo "line 2\n"; echo "line 3\n"; # comment 3 ?>

Thursday, January 20, 2022

Addition of Three Numbers Using Functions in C#

 A program that will ask the user to give three numbers and then the program will compute the sum of three numbers using a function in C# 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.


Please subscribe to my channel  https://www.youtube.com/channel/UCOs-lpOoIeJoh6gpJthPoGg




Program Listing

using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApplication1 { class Program { public static int Addition_Three_Numbers(int num1, int num2, int num3) { int total_sum = (num1 + num2 + num3); return total_sum; } static void Main(string[] args) { int num1, num2, num3, sum; Console.WriteLine("\n"); Console.Write("\tAddition of Three Numbers Using Functions in C#"); Console.WriteLine("\n"); Console.Write("\tGive First Value : "); num1 = Convert.ToInt32(Console.ReadLine()); Console.Write("\tGive Second Value : "); num2 = Convert.ToInt32(Console.ReadLine()); Console.Write("\tGive Third Value : "); num3 = Convert.ToInt32(Console.ReadLine()); sum = Addition_Three_Numbers(num1, num2, num3); Console.WriteLine(); Console.WriteLine("\tThe Total Sum is " + sum + "."); Console.WriteLine(); Console.WriteLine("\tEnd of Program"); Console.WriteLine(); Console.ReadKey(); } } }







Wednesday, January 19, 2022

Days of the Week Using Switch Statement in C

Days of the Week Using Switch Statement in C

 A simple program that will ask the user to give a number from 1 to 7 which represents days of the week like 1 - Monday, 2 - Tuesday, 3 - Wednesday, 4 - Thursday, 5-Friday, 6-Saturday, 7- Sunday using switch statement in C 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.





Program Listing

days.c


#include<stdio.h>

#include<conio.h>


void main()

{

int day=0;

printf("\n\n");

printf("\tDays of the Week Using Switch Statement in C");

printf("\n\n");

printf("\tGive a Day : ");

scanf("%d",&day);

printf("\n");

switch(day)

{


case 1:

{

printf("\tThe given day is Monday.");

break;

}

  case 2:

{

printf("\tThe given day is Tuesday.");

break;

}

case 3:

{

printf("\tThe given day is Wednesday.");

break;

}

case 4:

{

printf("\tThe given day is Thursday.");

break;

}

case 5:

{

printf("\tThe given day is Friday.");

break;

}

  case 6:

{

printf("\tThe given day is Saturday.");

break;

}

case 7:

{

printf("\tThe given day is Sunday.");

break;

}

default:

{

printf("\tInvalid day number");

}

}

printf("\n\n");

printf("\tEnd of Program");

printf("\n\n");

getch();

}


Two Decimal Places in Java

Two Decimal Places in Java

 A simple program to demonstrate how to declare and use two decimal places in Java 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.






Program Listing

import java.text.DecimalFormat; public class Two_Decimal { private static final DecimalFormat df = new DecimalFormat("0.00"); public static void main(String[] args) { // TODO Auto-generated method stub double temp = 123.785; System.out.print("\n\n"); System.out.print("\tTwo Decimal Places in Java"); System.out.print("\n\n"); System.out.println("\tTemperature Value : " + temp); System.out.print("\n"); System.out.println("\tTwo Decimal Value Equivalent " + df.format(temp)); } }