Monday, July 22, 2019

Grade Equivalent Using Switch Statement Using Go


Write a program using a switch statement to ask the students its grade and then the program will display the numerical equivalent of the given grade and its remarks on the screen based on the following given scale.

Grade Interval          Equivalent Grade        Remarks

97..100                  1.0                               EXCELLENT
94..96                      1.25                             EXCELLENT
91..93                      1.5                               VERY GOOD
88..90                      1.75                             VERY GOOD
85..87                      2.0                               GOOD
82..84                      2.25                             GOOD
79..81                      2.5                               SATISFACTORY
76..78                      2.75                             FAIR
75                            3.0                               PASSED
Below 75                 5.0                               FAILED




Sample Program Output


Program Listing

grade.go

/* grade.go
Authors  
Mr. Jake R. Pomperada
Mr. Rollyn M.  Moises
Mr. Sunday Latergo
Date : July 22, 2019  Monday  5:15 AM
 */

package main

import "fmt"

func main() {

var grade int32

fmt.Print("\n")
fmt.Print("\tGrade Equivalent Using Switch Statement")
fmt.Print("\n\n")
fmt.Print("\tPlease enter your grade : ")
fmt.Scanf("%d",&grade)

fmt.Print("\n")

switch (grade) {
case 97,98,99,100 :
   fmt.Println("\tYour grade equivalent is 1.0")
   fmt.Println("\tThe remarks is EXCELLENT.")
case 94,95,96 :
fmt.Println("\tYour grade equivalent is 1.25")
fmt.Println("\tThe remarks is EXCELLENT.")
case 91,92,93 :
   fmt.Println("\tYour grade equivalent is 1.5")
   fmt.Println("\tThe remarks is VERY GOOD.")
case 88,89,90 :
fmt.Println("\tYour grade equivalent is 1.75")
fmt.Println("\tThe remarks is VERY GOOD.")
case 85,86,87 :
   fmt.Println("\tYour grade equivalent is 2.0")
   fmt.Println("\tThe remarks is GOOD.")
case 82,83,84 :
fmt.Println("\tYour grade equivalent is 2.5")
fmt.Println("\tThe remarks is GOOD.")
case 79,80,81 :
   fmt.Println("\tYour grade equivalent is 2.25")
   fmt.Println("\tThe remarks is SATISFACTORY.")
case 76,77,78 :
fmt.Println("\tYour grade equivalent is 2.75")
fmt.Println("\tThe remarks is FAIR.")
  case 75 :
fmt.Println("\tYour grade equivalent is 3.0")
fmt.Println("\tThe remarks is PASSED.")
  default :
fmt.Println("\tYour grade equivalent is 5.0")
fmt.Println("\tThe remarks is FAILED.")
 }

fmt.Print("\n")
fmt.Print("\tEnd of Program")
fmt.Print("\n")
}





Civil Status Checker Program in Go


Write a program that will ask the person to give their civil status based of the following value 1 - Single, 2 - Married, 3 - Divorced,  4 - Annulled, 5 - Widow and 6 - Separated.   If the given year level of the student does not belong in the group it will display a message on the screen Invalid Civil Status. Try Again !!!.

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

civil_status.go

/* civil_status.go
   Written By :
   Jake R. Pomperada
   Rollyn M. Moises
   Sunday Vince V. Latergo
   July 21, 2019  Sunday 9:14 PM
   Bacolod City, Negros Occidental
*/
package main

import "fmt"

var civil_status int32
var user_name string

func main(){
fmt.Print("\n");
fmt.Print("\tCivil Status Checker Program");
fmt.Print("\n\n");
fmt.Print("\tWhat is your name? : ");
fmt.Scanln(&user_name)
fmt.Print("\tWhat is your civil status? : ");
fmt.Scanln(&civil_status)
if(civil_status == 1) {
fmt.Print("\n");
fmt.Print("\tHello ",user_name,"\n\n");
fmt.Print("\tYou are still Single.");
}
if(civil_status == 2) {
fmt.Print("\n");
fmt.Print("\tHello ",user_name,"\n\n");
fmt.Print("\tYou are already Married.");
}
if(civil_status == 3) {
fmt.Print("\n");
fmt.Print("\tHello ",user_name,"\n\n");
fmt.Print("\tYou are already Divorsed.");
}
if(civil_status == 4) {
fmt.Print("\n");
fmt.Print("\tHello ",user_name,"\n\n");
fmt.Print("\tYou are already Annulled.");
}
if(civil_status == 5) {
fmt.Print("\n");
fmt.Print("\tHello ",user_name,"\n\n");
fmt.Print("\tYou are already Widow.");
}
if(civil_status == 6) {
fmt.Print("\n");
fmt.Print("\tHello ",user_name,"\n\n");
fmt.Print("\tYou are already Separated.");
}

if (civil_status <1 || civil_status >6) {
fmt.Print("\n");
fmt.Print("\tInvalid Civil Status. Try Again !!!");
}
fmt.Print("\n\n");
fmt.Print("\tEnd of Program");
fmt.Print("\n");
}






Year Level Checker Program in Go

 Write a program that will ask the student to give their year level based of the following value 1 - Freshmen, 2 - Sophomore, 3 - Juniors and  4 - Seniors. If the given year level of the student does not belong in the group it will display a message on the screen  Invalid Year Level. Try Again !!!.

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

year_level.go

/* year_level.go
   Written By :
   Jake R. Pomperada
   Rollyn M. Moises
   Sunday Vince V. Latergo
   July 21, 2019  Sunday
   Bacolod City, Negros Occidental
*/
package main

import "fmt"

var year_level int32

func main(){
fmt.Print("\n");
fmt.Print("\tYear Level Checker Program");
fmt.Print("\n\n");
fmt.Print("\tWhat is your year level? : ");
fmt.Scanln(&year_level)
if(year_level == 1) {
fmt.Print("\n");
fmt.Print("\tYou Belong to Freshmen.");
}
if(year_level == 2) {
fmt.Print("\n");
fmt.Print("\tYou Belong to Sophomore.");
}
if(year_level == 3) {
fmt.Print("\n");
fmt.Print("\tYou Belong to Juniors.");
}
if(year_level == 4) {
fmt.Print("\n\n");
fmt.Print("\tYou Belong to Seniors.");
}

if (year_level <1 || year_level >4) {
fmt.Print("\n");
fmt.Print("\tInvalid Year Level. Try Again !!!");
}
fmt.Print("\n\n");
fmt.Print("\tEnd of Program");
fmt.Print("\n");
}





Thursday, July 18, 2019

Name and Age Using Hashes in Ruby

Write a program that accepts the name and age of the person using hashes. The program will stop by pressing the enter key and then it will display the list of a person name and its corresponding age 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

name_age.rb

# name_age.rb
# Author   : Jake Rodriguez Pomperada,BSCS,MAED-IT
# Date     : July 12, 2019   Friday     2:27 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

  print "\n\n"
  print "\t===== Name and Age Using Hashes ====="
  print "\n\n"
  
age_hash = { }  # start with an empty hash

 input = ""
 name = ""
 age = 0

 print "\tGive name, age; or just ENTER to quit: "
 input = gets.chomp
 while input != "" do
  (name, age) = input.split(",")
  age = age.to_i
  
  age_hash[name] = age
  
  print "\tGive Name, Age; or just ENTER to quit: "
  input = gets.chomp
 end

print "\n\n";
puts "\tList of Person's Names and It's Age "
print "\n\n";
 age_hash.each do |key,value|
  print "\t#{key.upcase} is already #{value} years old.\n"
 end
print "\n\n";
print "\tEnd of Program"



Search a Persons Age Using Hashes in Ruby

Write a program uses hashes to ask the users the person name and then the program will search and display the person name in uppercase and display the corresponding age of the person 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

search.rb


# search.rb
# Author   : Jake Rodriguez Pomperada,BSCS,MAED-IT
# Date     : July 16, 2019   Tuesday   7:07
# 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

  print "\n\n"
  print "\t===== Search a Persons Age Using Hashes ====="
  print "\n\n"
  people = %W[JAKE RUBY NORBERTO ALLIE JACOB JULIANNA LYDIA]
  ages = [41, 40, 28, 48, 6, 5, 77]
  input = ""
  position = 0
  print "\tEnter a name:  "
  input = gets.chomp
  position = people.index(input.upcase)
if position != nil then
   print "\n\n"
   print "\t#{people[position]} is already #{ages[position]} years old."
else
  print "\n\n" 
  print "\tI don't know who #{input.upcase} is."
end
print "\n\n";
print "\tEnd of Program"




Basketball Player Profile Using Hashes in Ruby

Write a program uses hashes that will display the basketball player profile consists of players name, height, weight, hair color, and shoe size 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

player.rb


# player.rb
# Author   : Jake Rodriguez Pomperada,BSCS,MAED-IT
# Date     : July 16, 2019   Tuesday   8: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@gmail.com and jakerpomperada@yahoo.com

  print "\n\n"
  print "\t===== Basketball Player Profile ====="
  print "\n\n"

  player = {name: 'Lebron Raymone James', height: '6 ft 7 inches',
            weight: '238 lbs', hair_color: 'black',shoe_size:  '15 (US)'}

  player.each do |key, value|
  print "\tPlayer #{key} is #{value}\n"
end
print "\n\n";
print "\tEnd of Program"




Positive and Negative Number Checker in PHP

Here is a sample program that will ask the user to give a number and then the program will check and determine if the given number is a positive and negative number.  Let us assume zero belongs to a positive number in this example.

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

index.php

<!DOCTYPE html>
<html lang="en">
<head>
<style>
body {
font-family: arial;
}
</style>
<?php
error_reporting(0);
$display="";
$val_num=$_POST['val_num'];
if(isset($_POST['clear'])){
$val_num="";   
$display="";
}
?>
<meta charset="UTF-8">
<title>Positive and Negative Number Checker Using PHP</title>
</head>
<body>
<h2>Positive and Negative Number Using PHP</h2>
<h4>Created By Mr. Jake R. Pomperada</h4>
<form action="" method="post">
<b>Give a Number</b><br/><br>
<input type="text" name="val_num" value="<?php echo $val_num; ?> "  required autofocus><br/><br>
<input type="submit" name="submit" value="Submit">  &nbsp;&nbsp;&nbsp;

<input type="submit" name="clear" value="Clear">
</form>
<br>
<?php

function phpAlert($msg) {
    echo '<script type="text/javascript">alert("' . $msg . '")</script>';
}

if(isset($_POST['submit'])){
$val_num=$_POST['val_num'];

if ( trim($val_num) == '' ) {
    
phpAlert(   "Cannot Be Empty."   );
}

if ($val_num >= 0) {
$display=" ";
echo $display;

$display = "The given nunber $val_num is a POSITIVE number.";
echo $display;
else {
$display =  "The given nunber $val_num is a NEGATIVE number.";
echo $display;
}
  

}
?>
</body>
</html>



Computer Subject Online Tutorial in PHP

A simple computer subject online tutorials that I wrote a long time ago in PHP, JavaScript, HTML and CSS that has a quiz at the end of every chapter.

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