Skip to content

Instantly share code, notes, and snippets.

Shankar Acharya shankar524

Block or report user

Report or block shankar524

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile

Congratulations! You are a speaker at the tech conference!

This guide will help you out with preparing your best talk yet.
Tip: this file has outline for your convenience (Press Ctrl+cmd+H on Mac or Ctrl+Alt+H for other OS)

How to choose what you will be talking about

Be passionate about your topic. Make sure that your topic is the most exciting, interesting, compelling thing in the universe.

Standard slides

Title slide

Create a visually engaging title page so the audience is interested and ready to listen before you begin speaking.

shankar524 / curious_number.rb
Created Jan 24, 2019
Curious Number A n-digit number is said to be curious if the last n digits of its square are the same as the original number. For example, 25^2 = 625 and 76^2 = 5776. (Curious numbers are also known as automorphic numbers.) An example of 9 digit number: 212890625^2 = 45322418212890625 Write a program to find all Curious Numbers of 1 to 10 digits.
View curious_number.rb
def square(number=0)
number ** 2
def is_curious_number(number)
diff = square(number) - number
last_digits=diff % (10**(number.digits.count))
return true
shankar524 / happy_number.rb
Last active Jan 24, 2019
This program finds if a number is a happy number or not.
View happy_number.rb
#this function squares a number
def square(number)
#this function breaks a number into its subsequent array
def break_number_to_arr(number)
return [0] if
shankar524 / prime_number.rb
Last active Jan 24, 2019
This ruby program finds the input number is prime or not.
View prime_number.rb
# this function finds if a number is prime or not
def is_prime_number(number=0)
# value to store if a number is prime or not
# initailly assumed prime
#iterate from 2 till half of that number
for num in 2..(number+1)/2
You can’t perform that action at this time.