Friday, July 12, 2019

Capitalize the First Letter of given String in Ruby


Write a program that will ask the user to give their first name, middle name, last name and then the program will capitalize the first letter of the first name, middle name, and last name and then greet the user on the screen using Ruby 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.

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

capitalize.rb


# capitalize.rb
# Author   : Jake Rodriguez Pomperada,BSCS,MAED-IT
# Date     : July 9, 2019  5;23 AM
# Address  : Bacolod City, Negros Occidental
# Tools    : Sublime Text and Ruby Version 2.6.3
# Location : Bacolod City, Negros Occidental  
# Website  : http://www.jakerpomperada.com
# Emails   : jakerpomperada@gmai.com and jakerpomperada@yahoo.com

print "\n\n";
print "\tCapitalize the First Letter of given String";
print "\n\n";
print "\tGive your First Name   : "
fname = gets.chomp
print "\n";
print "\tGive your Middle Name  : "
mname = gets.chomp
print "\n";
print "\tGive your Last Name    : "
lname = gets.chomp
print "\n\n";
print "\tWelcome #{fname.capitalize} #{mname.capitalize} #{lname.capitalize}.";
print "\n\n";
print "\tEnd of Program";
print "\n";





Wednesday, July 10, 2019

Odd and Even Number Checker Using Methods in Ruby

Write a program using if-else statement to ask the user to give a number and then the program will check and determine if the given number by the user is odd or even number and displays the results on the screen using methods

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

odd_even.rb

# odd_even.rb
# Author   : Jake Rodriguez Pomperada,BSCS,MAED-IT
# Date     : June 19, 2019   Wednesday  1:31 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

def check_odd_even(num_val)
  if(num_val % 2 == 0)
     print("\tThe given number #{num_val} is a EVEN number.");
  else    
     print("\tThe given number #{num_val} is a ODD number.");
  end  
end

puts "\n\n"
print "\tOdd and Even Number Checker";
puts "\n\n"

print "\tGive a number  : ";
num = gets.chomp
num = num.to_i;

print "\n";
print "\t===== DISPLAY RESULT ====="
print "\n\n";

check_odd_even(num);

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



Feet To Meter Converter in Ruby


Write a program that will ask the user value in feet and then it will convert into meters equivalent and display the result on the screen using methods.

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

 feet_meter.rb


# feet_meter.rb
# Author   : Jake Rodriguez Pomperada,BSCS,MAED-IT
# Date     : June 19, 2019   Wednesday  12:37 PM  
# Address  : Bacolod City, Negros Occidental
# Tools    : Sublime Text and Ruby Version 2.6.3
# Location : Bacolod City, Negros Occidental  
# Website  : http://www.jakerpomperada.com
# Emails   : jakerpomperada@gmai.com and jakerpomperada@yahoo.com

def feet_meter(ft)
  meters = (ft / 3.2808399);
  return(meters.round(2));
end

print "\n\n";
print "\tFeet To Meter Converter";
print "\n\n";
print "\tWhat is the Feet value? ";

feet_val = gets.to_i;

convert = feet_meter(feet_val);

print "\n";
print "\tDISPLAY RESULTS"
print "\n\n";
print("\tThe #{feet_val} Feet(s) = #{convert} Meter(s).");
print "\n\n";
print "\tEnd of Program";
print "\n";




Fahrenheit to Celsius Temperature Converter in Ruby

Write a program that will ask the user to give temperature in Fahrenheit and then the program will convert into Celsius temperature equivalent using methods 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.

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

fah_celsius.rb


# fah_celsius.rb
# Author   : Jake Rodriguez Pomperada,BSCS,MAED-IT
# Date     : June 19, 2019   Wednesday  9:48 AM  
# Address  : Bacolod City, Negros Occidental
# Tools    : Sublime Text and Ruby Version 2.6.3
# Location : Bacolod City, Negros Occidental  
# Website  : http://www.jakerpomperada.com
# Emails   : jakerpomperada@gmai.com and jakerpomperada@yahoo.com

def celsius_solve(fah)
  return((fah.to_f - 32 ) * 5/9);
end

celsius = 0.00;

print "\n\n";
print "\tFahrenheit to Celsius Temperature Converter";
print "\n\n";
print "\tGive Tempeature in Fahrenheit : ";

fahrenheit = gets.to_f

temp = celsius_solve(fahrenheit);

print "\n";
print "\tDISPLAY RESULTS"
print "\n\n";
puts "\tThe temperature in Celsius is %.2f°C." % temp
print "\n";
print "\tEnd of Program";
print "\n";





Factorial Number Converter in Ruby

Write a program that will ask the user to give integer number and then the program will compute the factorial value of the given number and display the results on the screen using methods.

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

factorial.rb

# factorial.rb
# Author   : Jake Rodriguez Pomperada,BSCS,MAED-IT
# Date     : June 19, 2019  Wednesday   8:40 AM  
# Address  : Bacolod City, Negros Occidental
# Tools    : Sublime Text and Ruby Version 2.6.3
# Location : Bacolod City, Negros Occidental  
# Website  : http://www.jakerpomperada.com
# Emails   : jakerpomperada@gmai.com and jakerpomperada@yahoo.com

def factorial(n=0)
  (1..n).inject(:*)
end

print "\n\n";
print "\tFactorial Number Converter";
print "\n\n";
print "\tGive a Number : ";

num_val = gets.to_i;

solve= factorial(num_val);

print "\n";
print "\tDISPLAY RESULTS"
print "\n\n";
print("\tThe factorial value of #{num_val} is #{solve}.");
print "\n\n";
print "\tEnd of Program";
print "\n";







Kilograms To Pounds Converter in Ruby

Write a program to ask the user to give value in kilograms and then it will convert it into pounds equivalent using methods. 

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

kg_pounds.rb

# kg_pounds.rb
# Author   : Jake Rodriguez Pomperada,BSCS,MAED-IT
# Date     : June 18, 2019   Tuesday  2:59 PM  
# Address  : Bacolod City, Negros Occidental
# Tools    : Sublime Text and Ruby Version 2.6.3
# Location : Bacolod City, Negros Occidental  
# Website  : http://www.jakerpomperada.com
# Emails   : jakerpomperada@gmai.com and jakerpomperada@yahoo.com

def kilograms_pounds(kg)
  pounds = kg * 2.20462262;
  return(pounds.round(2));
end

print "\n\n";
print "\tKilograms To Pounds Converter";
print "\n\n";
print "\tWhat is the Kilogram value? ";

kg_val = gets.to_i;

convert = kilograms_pounds(kg_val);

print "\n";
print "\tDISPLAY RESULTS"
print "\n\n";
print("\tThe #{kg_val} Kilogram(s) = #{convert} Pound(s).");

Decimal To Binary Number Converter in Ruby


Write a program that will ask the user to give temperature in Celsius and then the program will convert into Fahrenhe it temperature equivalent using methods 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.

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

decimal_binary.rb

# decimal_binary.rb
# Author   : Jake Rodriguez Pomperada,BSCS,MAED-IT
# Date     : June 18, 2019   Tuesday  2:17 PM  
# Address  : Bacolod City, Negros Occidental
# Tools    : Sublime Text and Ruby Version 2.6.3
# Location : Bacolod City, Negros Occidental  
# Website  : http://www.jakerpomperada.com
# Emails   : jakerpomperada@gmai.com and jakerpomperada@yahoo.com

def dec2bin(number)
    number = Integer(number)
    if(number == 0) then 0 end
        
    ret_bin = ""
    while(number != 0)
        ret_bin = String(number % 2) + ret_bin
        number = number / 2
    end
    ret_bin
end

print "\n\n";
print "\tDecimal To Binary Number Converter";
print "\n\n";
print "\tGive a Number : ";

val_num = gets.to_i;

convert =  dec2bin(val_num);

print "\n";
print "\tDISPLAY RESULTS"
print "\n\n";
print("\tThe decimal of #{val_num} its binary equivalent is #{convert}.");
print "\n\n";
print "\tEnd of Program";
print "\n";






Celsius to Fahrenheit Temperature Converter in Ruby

Write a program that will ask the user to give temperature in Celsius and then the program will convert into Fahrenheit temperature equivalent using methods 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.

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

temperature.rb


# temperature.rb
# Author   : Jake Rodriguez Pomperada,BSCS,MAED-IT
# Date     : June 17, 2019   Monday  2:45 PM  
# Address  : Bacolod City, Negros Occidental
# Tools    : Sublime Text and Ruby Version 2.6.3
# Location : Bacolod City, Negros Occidental  
# Website  : http://www.jakerpomperada.com
# Emails   : jakerpomperada@gmai.com and jakerpomperada@yahoo.com

def fahrenheit_solve(celsius)
 return((celsius.to_f * 9 / 5) + 32);
end

celsius = 0.00;

print "\n\n";
print "\tCelsius to Fahrenheit Temperature Converter";
print "\n\n";
print "\tGive tempeature in celsius : ";

celsius = gets.to_f

temp = fahrenheit_solve(celsius)

print "\n";
print "\tDISPLAY RESULTS"
print "\n\n";
puts "\tThe temperature in fahrenheit is %.2f°F." % temp
print "\n";
print "\tEnd of Program";
print "\n";



Parameter and Area of the Circle Solver in Ruby

Write a program which accepts the radius of a circle from the user and compute the parameter and area using methods 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 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

area_circle.rb

# area_circle.rb
# Author   : Jake Rodriguez Pomperada,BSCS,MAED-IT
# Date     : June 17, 2019   Monday  2:37 PM  
# Address  : Bacolod City, Negros Occidental
# Tools    : Sublime Text and Ruby Version 2.6.3
# Location : Bacolod City, Negros Occidental  
# Website  : http://www.jakerpomperada.com
# Emails   : jakerpomperada@gmai.com and jakerpomperada@yahoo.com

def perimeter_solve(radius)
 return(2 * 3.141592653 * radius);
end

def area_solve(radius)
 return(3.141592653 * radius * radius);
end

radius = 5.00;
perimeter = 0.00;
area = 0.00;

print "\n\n";
print "\tParameter and Area of the Circle Solver";
print "\n\n";
print "\tRadius of the circle: ";

radius = gets.to_f
perimeter =  perimeter_solve(radius);
area = area_solve(radius);

print "\n";
print "\tDISPLAY RESULTS"
print "\n\n";
puts "\tThe perimeter is %.2f of the circle." % perimeter
print "\n";
puts "\tThe area is %.2f of the circle." % area
print "\n";
print "\tEnd of Program";
print "\n";