Sunday, March 13, 2022

Product of Two Numbers in Scala

 Machine Problem

Write a program that will ask the user to give two numbers, and then the program will compute, and display the product of the two 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.

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

Thank you very much for your support.




Program Listing

/* product.scala
   Prof. Jake Rodriguez Pomperada, MAED-IT, MIT
   www.jakerpomperada.blogspot.com and www.jakerpomperada.com
   jakerpomperada@gmail.com
   October 31, 2021    Sunday  2:28 PM
   Bacolod City, Negros Occidental
 */

import java.util.Scanner;

object product {
   
    def main(args: Array[String]) : Unit = {
   
        var scanner = new Scanner(System.in);
   
        print("\n\n");
        print("\tProduct of Two Numbers in Scala");
        print("\n\n");  
        print("\tEnter the first number : ");
        var a = scanner.nextInt();
       
        print("\n");
        print("\tEnter the second number : ");
        var b = scanner.nextInt();

        var product = (a*b);
       
        print("\n");
        println("\tThe product of " + a + " and " + b + " is " + product +".");
        print("\n");
        print("\tEnd of Program");
        print("\n\n");
       
    }
}

Saturday, March 12, 2022

Feet To Centimeter Converter in Python

Feet To Centimeter Converter in Python

 A simple program to ask the user to give value in feet and then the program will convert the given feet into centimeter equivalent 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

Thank you very much for your support.





Program Listing

feet_centimeter.py

print();
print("Feet To Centimeter Converter in Python");
print();
feet = input("How many feet(s) : ")
value = float(feet)

def find_centimeters(value):
return float(value)* 30.48

print();

get_result = find_centimeters(value)
final_result = int((get_result * 100) + 0.5) /100.0

print("The equivalent value of ", value, " feet(s) in centimeters is "
,final_result,' centimeter(s).')
print();
print("End of Program")
print();

Friday, March 11, 2022

String Palindrome in Scala

String Palindrome in Scala

 Machine Problem

Write a program to ask the users to give a string and then the program will check and determine whether the given string is a palindrome or not and display the results 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.

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

Thank you very much for your support.




Program Listing

/* string_palindrome.scala
   Prof. Jake Rodriguez Pomperada, MAED-IT, MIT
   www.jakerpomperada.blogspot.com and www.jakerpomperada.com
   jakerpomperada@gmail.com
   March 6, 2022   2:44 PM    Sunday
   Bacolod City, Negros Occidental
 */


import java.util.Scanner;

object string_palindrome {

  def string_palindrome_check(s : String ) : Boolean = {
      val sletters = s.toLowerCase.filter(c => c.isLetter)
      (sletters == sletters.reverse)
  }

  def main(args: Array[String]) : Unit = {

    var input = new Scanner(System.in);

    var display_result = " ";

    print("\n");
    print("\tString Palindrome Using Scala");
    print("\n\n");
    print("\tGive a String :  ");
    var str_given = input.nextLine();

    if (string_palindrome_check(str_given))
        {
         display_result = "\tThe given string " + str_given + " is a Palindrome."
        } else {
            display_result = "\tThe given string " + str_given + " is Not a Palindrome."
        }
   
    print("\n");
    print(display_result);
    print("\n\n");
    print("\tEND OF PROGRAM");
    print("\n\n");
  }
}

Vowels and Consonants in Scala

Count Vowels and Consonants Using Scala

 Machine Problem

Write a program to ask the users to give a string or a sentence then the program will count the number of vowels, and consonants and display the results 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.

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

Thank you very much for your support.





Program Listing

Problem No. 7

Write a program to ask the users to give a string or a sentence
then the program will count the number of vowels, and consonants
and display the results on the screen.

Solution

/* vowels_consonants.scala
   Prof. Jake Rodriguez Pomperada, MAED-IT, MIT
   www.jakerpomperada.blogspot.com and www.jakerpomperada.com
   jakerpomperada@gmail.com
   March 9, 2022  3:12 PM    Wednesday
   Bacolod City, Negros Occidental
 */

import java.util.Scanner;

object vowels_consonants {


   def main(args: Array[String]) : Unit = {

    var input = new Scanner(System.in);

   var vowels = 0; var consonants = 0;
  
   var a = 0;

    print("\n");
    print("\tCount Vowels and Consonants Using Scala");
    print("\n\n");
    print("\tGive a String or a Sentence :  ");
    var line = input.nextLine();

    line = line.toLowerCase();
    
    while (a < line.length) 
    {
      var ch = line.charAt(a);

      // check if character is any of a, e, i, o, u
      if (ch == 'a' || ch == 'e' || ch == 'i' || ch == 'o' || ch == 'u') {
        vowels=vowels+1;
      }

      // check if character is in between a to z
      else if ((ch >= 'a' && ch <= 'z')) {
        consonants=consonants+1;
      }
      
    a=a+1;
    }
    print("\n")
    print("\t===== DISPLAY RESULTS ====\n\n");
    printf("\tNumber of Vowels     : %d \n" ,vowels);
    printf("\tNumber of Consonants : %d " ,consonants);
    print("\n\n");
    print("\tEND OF PROGRAM");
    print("\n\n");
  }
  
 
  }

How To Add Hashtag in Your Video Title in YouTube

How To Create an Object in C++

How To Create an Object in C++

 A simple program to demonstrate how to create and use objects 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

Thank you very much for your support.






Program Listing

#include <iostream>

 using namespace std;

class Person {       // The class
  public:             // Access specifier
    int age;        // Attribute (int variable)
    string persons_name;  // Attribute (string variable)
    string address;  // Attribute (string variable)
};

int main() {
  Person Male; // Create an Object

  cout << "\n\n";
  cout << "How To Create an Object in C++";
  cout << "\n\n";
  // Access attributes and set values
  Male.age = 43;
  Male.persons_name = "John Dela Cruz";
  Male.address = "Silay City, Negros Occidental";
  
  // Print attribute values
  cout << "Persons Name    : " << Male.persons_name << "\n";
  cout << "Persons Age     : " << Male.age << " years old. \n";
  cout << "Persons Address : " << Male.address << "\n";
  return 0;
}

Thursday, March 10, 2022

Do You Want To Continue Yes or No in Python

Do You Want To Continue Yes Or No in Python

 A simple program to demonstrate do you want to continue yes or no in a 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

Thank you very much for your support.



Program Listing

while True:
print()
print("\tDo You Want To Continue Yes Or No in Python")
print()

print("Hello Again")
print()
cont = input("Another one? yes/no > ")

while cont.lower() not in ("yes", "no"):
cont = input("Another one? yes/no > ")

if cont == "no":
print()
print("\tThank you for using this software.")
break

Login Program in PHP and MySQL

Login Program Using PHP and MySQL

 A login program that I wrote using PHP and MySQL I hope you will learn from it and thank you for your support.

 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

Thank you very much for your support.





DOWNLOAD THE COMPLETE AND FREE SOURCE CODE HERE


Wednesday, March 9, 2022

Record Keeping App With Delete Function in Python

Record Keeping App With Delete Function in Python

 A record keep app with delete function that I wrote using Python programming language it demonstrate text file database programming. 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 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

Thank you very much for your support.






Program Listing


# record keeping app with delete function in python
# Jake Rodriguez Pomperada, MAED-IT, MIT
# www.jakerpomperada.com and www.jakerpomperada.blogspot.com
# jakerpomperada@gmail.com
# Bacolod City, Negros Occidental Philippines

import os
import sys
from pathlib import Path


class Records:
def __init__(self, choice):
self.choice = choice
if choice == "A":
with open("record.txt", "r") as records:
for last_line in records:
pass
if last_line[0] == "#":
num = 1
else:
num = int(last_line[0]) + 1

name = input("Enter Name: ")
email = input("Enter Email: ")
address = input("Enter Address: ")
with open("record.txt", "a") as writeRecord:
writeRecord.write(f"{num}\t\t\t{name}\t\t\t{email}\t\t\t{address}\n")
elif choice == "B":
with open("record.txt", "r") as countRecords:
count = len(countRecords.readlines()[1:])

if count == 0:
print("There are no records!!")
print()
else:
with open("record.txt", "r") as readRecords:
print(readRecords.read())
elif choice == "C":
record_id = input("Enter Record #: ")
with open("record.txt", "r") as f:
lines = f.readlines()
with open("record.txt", "w") as readRecords2:
for line in lines:
if not line.startswith(record_id):
readRecords2.write(line)
print("Record Deleted.")
elif choice == "D":
print("No records found.")
with open("record.txt", "r+") as f:
f.truncate(0)
elif choice == "E":
sys.exit("Thank you!")
else:
print("Invalid response. Please try again.")


while True:
def createFile():
with open("record.txt", "w+") as create:
create.write("#\t\t\tName\t\t\t Email\t\t\t Address\n")
if Path("record.txt"):
if os.stat("record.txt").st_size != 0:
with open("record.txt", "r+") as readFirstLine:
first = readFirstLine.readlines()[0][0]
if first != "#":
readFirstLine.write("#\t\t\tName\t\t\t Email\t\t\t Address\n")
else:
createFile()
else:
createFile()

print("==========================================================")
print(" ~ Record Keeping App With Delete Function in Python ~")
print("===========================================================")
print("Available Operators:")
print("A) Add Record\t\tB) View Record")
print("C) Delete record\tD) Clear Records")
print("E. Exit\n")

selection = input('Enter selection: ').upper()
Records(selection)

Tuesday, March 8, 2022

Divide Two Numbers in Python

Divide Two Numbers in Python

 A simple program to ask the user to give two numbers and then the program will divide the given numbers and display the result on the screen 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

Thank you very much for your support.





Program Listing

while True:
print()
print("\tDivide Two Numbers in Python")
print()
# take inputs
num1 = float(input('Enter first number: '))
num2 = float(input('Enter second number: '))

# Divide numbers
division = num1 / num2

# print value
print("The division of {0} and {1} is {2}"
.format(num1, num2, division))
cont = input("Another one? yes/no > ")

while cont.lower() not in ("yes", "no"):
cont = input("Another one? yes/no > ")

if cont == "no":
print()
print("\tThank you for using this software.")
break

Monday, March 7, 2022

Factorial a Number Using For Loop in C

Factorial a Number Using For Loop in C

 A simple program that I wrote using C programming language to ask the user to give a number and then the program will compute the factorial value of a given number using for loop statement.

 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

Thank you very much for your support.





Program Listing

#include <stdio.h>  

int main()    
{    
 int i,fact=1,number=0;
int a=0;  char ch='x';
char equal = '=';

 printf("\n\n");
 printf("\tFactorial a Number Using For Loop in C");
 printf("\n\n");
 printf("\tGive a number: ");    
  scanf("%d",&number); 
    printf("\n\n");
    
    for(i=1;i<=number;i++){    
      fact=fact*i;  
     
  }  
  printf("\t");
  for (a=number; a>=1;a--) {
  if (a==1) {
  ch='\0';
 
  } 
   
  printf("%2d %c",a,ch);
 
  }
  printf("%c %d",equal,fact);
 
 printf("\n\n");
 printf("\tEnd of Program");
 printf("\n\n");
    
return 0;  
}