Skip to content

Instantly share code, notes, and snippets.

View ednasawe's full-sized avatar
🌝

Edna ednasawe

🌝
  • Biopane Energy and tech authority
  • USA
View GitHub Profile
@ednasawe
ednasawe / Array.rb
Created September 30, 2016 19:13
Ed
[1] pry(main)> def prdarray (arr)
[1] pry(main)* initial = 1
[1] pry(main)* arr.each do |i|
[1] pry(main)* initial=initial*i
[1] pry(main)*
[1] pry(main)* if (i=0)
[1] pry(main)* return puts "Elements in array must be non zero"
[1] pry(main)* end
[1] pry(main)* end
[1] pry(main)* new_arr=[]
def squareroot(n, diff)
gues=refine(1,n)
while(((gues*gues)-n)>diff)
gues=refine(gues, n)
end
gues
end
@ednasawe
ednasawe / fiw.rb
Created October 3, 2016 08:16
intro_to_programming
def in_words(int)
numbers_to_name = {
1000000000000 => "trillion",
1000000000 => "billion",
1000000 => "milliom",
1000 => "thousand",
100 => "hundred",
90 => "ninety",
80 => "eighty",
70 => "seventy",
def number_range(list_):
if len(list_) == 1:
return [list_[0]]
smallest = list_[0]
largest = list_[0]
for number in list_:
if number > largest:
largest = number
elif number < smallest:
smallest = number
@ednasawe
ednasawe / anagram and arrays.py
Created October 12, 2016 08:55
Activity 1,2,3
Activity 1 (sort_playlist.py)
def lowest(song):
sorted_playlist = []
min = song[0]
for i in song:
if i[1] < min[1]:
min = i
return min
def sort_playlist(playlist):
@ednasawe
ednasawe / resume.py
Last active December 16, 2020 21:36
Resume
*RESUME*
*EDNA SAWE*
[GitHub](https://github.com/ednasawe) [Website Projects](https://techauthorityorg.wordpress.com/)
[Website](https://seed.uno/enterprise-profiles/biopane-energy-company) [Email]([email protected])
[LinkedIn](https://www.linkedin.com/in/sawe-edna-65765baa/) [Twitter]( https://twitter.com/CheptooSawe)
[Website](https://cedna198.wixsite.com/biopaneenergy)