There was a cookie jar that hadn't been opened in 46 years. Why?

Once upon a time, there was a man named Marty who was about to turn 40. His sister, Vanessa, didn’t know what to give him. She thought she could just give him some generic Hallmark birthday card. Her other siblings, on the other hand, planned to give Marty something nicer.

The oldest was going to give him a $400 watch. The third sibling, a $600 cooking set. The fourth sibling, a $1000 Cheesecake Factory gift card.

Vannessa was clueless about what to give him. She’s the youngest and thought a birthday card would help but no. …


Output the base pair of every base in a DNA sequence

Photo by National Cancer Institute on Unsplash

We are going to write a function called DNAStrand that will accept a string, dna, as an argument.

Deoxyribonucleic acid (DNA) is a chemical found in the nucleus of cells and carries the “instructions” for the development and functioning of living organisms.

There are four common nucleotides found in DNA:

A — Adenine

C — Cytosine

G — Guanine

T — Thymine

In this function, you are given a DNA sequence string containing some or all of the nucleotides. The goal of the function is to output the complementary bases of each of the nucleotides.

The base pairs:

A =…


Even though this publication has been around for over a year, I haven’t written a newsletter until now. Welcome.

You will receive a newsletter once a month with an update of all the stories written in the past month. This email will be a little short as I am new to newsletters.

Here is a recap of all the shenanigans that stepped foot into the Curious Birds world.


A function that determines if the given integer is a Narcissistic Number

Photo by Marija Zaric on Unsplash

We are going to write a function called narcissistic that will accept an integer, value, as an argument.

The goal of the function is to determine if the given integer is a Narcissistic Number. A Narcissistic Number is a positive number which is the sum of its own digits, each raised to the power of the number of digits in a given base.

Example:

153
1^3 + 5^3 + 3^3 = 1 + 125 + 27 = 153
1652
1^4 + 6^4 + 5^4 + 2^4 = 1 + 1296 + 625 + 16 = 1938

The first number, 153


Given an array of integers, find the one that appears an odd number of times

Photo by Ryan Quintal on Unsplash

We are going to write a function called findOdd that accepts an array, arr, as an argument.

For this function, you are given an array. This array contains integers and all of them have an even number of duplicates except one number. The goal of the function is to find that number that appears an odd number of times and return it.

If there are no numbers that have an odd number of duplicates, the function will return -1.

Example:

findOdd([1,1,1,1,1,1,10,1,1,1,1]) // output: 10findOdd([20,1,1,2,2,3,3,5,5,4,20,4,5]) // output: 5

The first thing we are going to do is loop through arr.


A short story about a young man’s mission to find his missing avocado toast

Once upon a time, there was a young man that loved avocado toast. He loved the toast so much. That was all he ate. The avocado toast was his breakfast, lunch, dinner, snack, and drink. Yes, he also drank his avocado toast and he loved his blender because of it.

One morning he made avocado toast for himself. This toast was different from the other avocado toasts he made. This toast was made with real *organic* avocados.

But before he ate it, he had to go to the bathroom. When he returned to his kitchen, the toast wasn’t there. …


Translate a string to Pig Latin

Photo by Kenneth Schipper Vera on Unsplash

We are going to write a function called pigIt that will accept a string, str, as an argument.

You are given a string and the goal of the function is to translate the string to Pig Latin. To translate the string, you do the following:

  1. Move the first letter of the word to the end of the word.
  2. Add “ay” to the end of the word.

That’s it. If the word is only a single letter, skip step number one and just add an “ay” at the end. If the string is a punctuation mark or a number, leave it…


Return a unique list of items without altering the original order of elements

Photo by Brett Jordan on Unsplash

We are going to write a function called uniqueInOrder that will accept a string or an array, iterable, as an argument.

You are given a string or an array of numbers. The goal of the function is to return an array containing all the elements from the input but without any consecutive duplicates. The function should also preserve the original order of the elements.

Example:

uniqueInOrder('ABBCcAD')
// output: ['A', 'B', 'C', 'c', 'A', 'D']
uniqueInOrder([1,2,2,3,3])
// output: [1,2,3]

From the first example, the function removed the extra 'B' from the string. Even though there are two letter c’s they are…


Odd Human Behavior

I blame technology for everything even the weather

Once upon a time, there was a 56-year-old lady named Sherry that blamed technology for everything.

When it rained, she blamed it on smartphones.

When it was hot outside, she blamed it on drones.

When she saw a pimple develop on her nose, she blamed it on 4K televisions.

When her toaster exploded, she blamed it on Samsung Galaxy Note20 Ultra phones.

When she caught a cold, she blamed it on Amazon Alexa.

When she saw a grey hair strand after dyeing her hair black, she blamed it on the new iMacs (and her YouTube tutorial).

When her 10-year-old Dalmatian…

Erica N

An illustrator that writes humor and satire about everything and nothing at the same time.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store