Weekly Coder
95 subscribers
84 photos
6 videos
1 file
73 links
Byte sized weekly coding challenges to hone your problem-solving prowess.
Download Telegram
๐ŸŽด Terni Lapilli

Code to liven up this Egyptian game from the 1300 BC often called Tic-Tac-Toe ( O - X )!

๐Ÿ’ก Often played on a 3x3 grid, players of this game take turns marking empty squares with their respective symbols, usually X and O.

The objective is to get three of their symbols in a row, either horizontally, vertically, or diagonally. The first player to achieve this wins the game. And if no winner the game is a draw.

๐Ÿ‘ฉโ€โš–๏ธ The rule is simple. Be the first player to get your symbol in a row.

๐ŸŽฎ Play tic-tac-toe here.

โš™๏ธ Find all details of this week's challenge here. Fork it on GitHub (or download it) and build on!

๐Ÿ“… Submissions: Sunday, 12:00 LT Morning

๐Ÿช Send your submissions in the comments (the .zip file or the link to your fork).

@WeeklyCoder | Week 5
๐Ÿงฉ Lingo Dash | Vocabulary Game

Bring to life this graphics of a brand new game as closely and neatly as you can.

๐Ÿ’ก Provided the design (see comments), the task of this week is to lay the foundations for a game to be built in the weeks to follow.

๐Ÿ‘ฉโ€โš–๏ธ Rule of the game: is to be refined further as we go along creating it. For now though, let you make guesses from the graphics.

๐Ÿ† As a recognition of efforts in this series, the best version of the game will be used during Foka Book Club's meetup game sessions.

โš™๏ธ Find all details of this week's challenge here. Fork it on GitHub (or download it) and build on!

๐Ÿ“… Submissions: Sunday, 12:00 LT Morning

๐Ÿช Send your submissions in the comments (the .zip file or the link to your fork).

@WeeklyCoder | Week 6
๐Ÿฅ› Modest Dictionary

This week, let's attempt to make a simple dictionary.

Stepping back from last week's seemingly daunting game, let's break it down and make a simple dictionary that accepts a WORD to lookup (through a simple input dialog box) and print out the MEANING on the console. That's it.

โš™๏ธ Find all details of this week's challenge here. Fork it on GitHub (or download it) and build on!

๐Ÿ“– Find the simplified source as a .txt file here.
๐Ÿ“„ Get started using this code.

๐Ÿ“… Submissions: Sunday, 12:00 LT Morning

๐Ÿช Send your submissions in the comments (the .zip file or the link to your fork).

@WeeklyCoder | Week 7
๐Ÿ‘‹ Hey exam takers,

1 minute challenge is what we have this week.

So easy you could finish it before you draw the next breath!

2 Steps:
1 - Download the pre-written code from here
2 - Modify it so that it selects a random word from the list of given words to be displayed whenever there's a mouse release.

โœ๏ธ Bonus: Add more words from your English class vocabulary and use it to prepare for your exam!

๐ŸŽ– Will you be one the first few members to take part in this one minute coding challenge?

Keep the momentum going!

@WeeklyCoder | Week 8
โŒš๏ธ Stopwatch

A tiny bit tricky challenge this week.

๐Ÿ’ก Whether to track your study or book reading sessions, fitness goals, practice for a presentation, or else, a stop watch can be incredibly handy.

Where to start?
1 - Let you represent the key 'S' to Start / Stop a timer that starts from 00:00:00
2 - Let pressing the [SPACEBAR] Pause / Resume it.

โœ๏ธ Bonus: Convert the keys to clickable buttons. Introduce a lap timer. Save the data? How about multiple stop watches to track multiple things?

โš™๏ธ Find all details of this week's challenge here. Fork it on GitHub (or download it) and build on!

๐Ÿ“… Submissions: Sunday, 12:00 LT Morning

๐Ÿช Send your submissions in the comments (the .zip file or the link to your fork).

@WeeklyCoder | Week 9
๐Ÿ•› Analog Clock

What time is it? It's Polar Coordinate Time, of course.

๐Ÿ’ก Moving past reading time as figures, let's depict it as analog clock with hands [H : M : S].

Where to start?
- Let you represent just one of the hands, seconds for instance, as a hand. Use sin (), cos ()

Recommended studying:
- Polar Coordinates [tutorial video]

โœ๏ธ Bonus:
- Could you make the hands move smoothly (just like this video)?
- How about using some APIs or hardcoding time differences to depict World Clock with Multiple Time Zones?

โš™๏ธ Find all details of this week's challenge here. Fork it on GitHub (or download it) and build on!

๐Ÿ“… Submissions: Sunday, 12:00 LT Morning

๐Ÿช Send your submissions in the comments (the .zip file or the link to your fork).

@WeeklyCoder | Week 10
๐Ÿ”ฅ1
๐Ÿ—‚ Directory Shortener

Here's a multi-week challenge for ya.

๐Ÿฅ… Goal:
to simplify directory navigation. It is to allow users to create and use custom shortcuts for quick access to specific folders. Much like a URL shortener; but for folders.

๐ŸŽ Benefit: reduced the time spent on navigating lengthy directory paths.

๐Ÿ’ก Question: Yes, you could make shortcuts of the folders but if you have more than a handful, you'll find them cluttering your desktop.

๐Ÿ†š Difference: Through this tool, however, the goal is to have an instantly accessible search bar on which shortcodes can be entered leading to opening of corresponding folders.

โš™๏ธ Find all details of this week's challenge here. Fork it on GitHub (or download it) and build on!

๐Ÿ“… Submissions: Sunday, 12:00 LT Morning

๐Ÿช Send your submissions in the comments (the .zip file or the link to your fork).

@WeeklyCoder | Week 11
๐Ÿ‘1
๐ŸŽ„ Christmas Wallpapers Slideshow

Make Christmas feel Christmas with a slideshow of tasty photos!

๐Ÿฅ… Goal: To make the
~100 Christmas themed photos be displayed fullScreen () and loop one after another while you cozy up and enjoy the show.

Download the images (zipped) here.

โœ๏ธ Recommended studying:
- PImage, requestImage (), loadImage ()
- blend (), mask ()

๐Ÿฆถ Quick Start:
- Get the starting code here [with all images | just the code]

โœจ Make it even more exciting:
- Add controls: LEFT key for Previous image and RIGHT key for Next
- Add transitions [Slide Left/Right/Up/Down | Fade In/Out | Crossfade | +]
- Add Christmas spirited music to play in the background
- Make it into a live wallpaper using APDE

๐Ÿช Send your submissions in the comments.

@WeeklyCoder | Week 12
๐Ÿ–‡ Seven Million Three Hundred Twenty One Thousand Three Hundred and Sixty-Four

That's how long it has been since the creation of @WeeklyCoder โ€” in seconds.

Got a straight forward challenge practice for ya this week.

๐Ÿฅ… Goal: Make a number to Words converter. A user enters a number (as figures) and your program converts it to text (as words). Here's an example.

โœ๏ธ Recommended studying:
- arrays, stringList, stringDict ()
- % (modulo), / (division)

๐Ÿฆถ Quick Start:
- Get the quick-start code here.

โœจ Make it even more exciting:
- let it handle negative numbers
- let it handle decimal point
- make it into a quiz game and let your young siblings learn [A number appears as text of a randomly generated integer and they get to type it out as figures]
- twist it into currency conversion [use APIs? Resource 1 | Resource 2]

๐Ÿ“… Submissions: Sunday, 12:00 LT Afternoon

๐Ÿช Send your submissions in the comments.

@WeeklyCoder | Week 13
๐Ÿ‹ Matches of the Lemon!

Got such a simple and easy game for you this week!

๐Ÿ“— With the price of lemons skyrocketing, people may soon resort to digital matchmaking during Ketera.

๐Ÿฅ… Goal: To create a simple random number guessing game but with a twist of Lemons.

๐Ÿพ Steps: Let three identical lemons appear on the screen when the game starts. A player clicks on any at random and find out if they're in luck for a sweet match.

โœ๏ธ Recommended learning:
- PImage, loadImage ()
- mouseReleased ()
- loops

๐Ÿฆถ Quick Start:
- Get the quick-start code from here.

โœจ Make it more exciting:
- Give a second chance for first wrong guesses
- Introduce stages such that a winner is a player who guessed three stages in a row
- Multiplayer mode where you secretly select a lemon and let a someone else find it. It's a match if it's a match! ;)

๐Ÿ“… Submissions: Sunday, 12:00 LT Afternoon

๐Ÿช Send your submissions in the comments.

@WeeklyCoder | Week 14
๐Ÿง‘โ€๐ŸŒพ Alleles Alleles Alleles

Challenge for this week is so light and easy it can hardly stay grounded.

๐Ÿ’ก Intro: An allele is one of multiple versions of DNA sequence at a given genomic location.

๐Ÿฅ… Goal: Given a genotype (represented by a pair of alleles, e.g. GG) as input from a user, display the conditions for that genotype. i.e. whether an individual is Homozygous* or Heterozygous** for that allele.

*Homozygous: If the two alleles are the same, e.g., DD
**Heterozygous: If the alleles are different, e.g., Dd

๐Ÿพ Steps: Take a two character String input from a user. Compare the two characters to decide the condition of the genotype.

โœ๏ธ Recommended learning:
- .charAt ()
- .toUpperCase (), toLowerCase (), .equals ()

๐Ÿฆถ Quick Start:
- Get the quick-start code from here.

โœจ Just a dab of challenge:
- Determine also whether the genotype expressed is Dominant or Recessive.

๐Ÿ“… Submissions: Sunday, 12:00 LT Afternoon

๐Ÿช Send your submissions in the comments.

@WeeklyCoder | Week 15
โˆš It's Punnett Square Time!

Punnett squares measure the probability of a genetic outcome resulting from a genetic cross.

๐Ÿฅ… Goal: Given two genotype (represented by pairs of alleles, eg. TT and Tt) as input from a user, display the possible combinations of alleles of two parents.

๐Ÿพ Steps: Start with taking two character String inputs from a user. Cross them and print the output on console or canvas. Count the resulting offspring's types and display probabilities for each.

โœ๏ธ Recommended learning:
- Escape Sequence
- .charAt ()
- .toUpperCase (), toLowerCase (), .equals ()
- for loops, arrays, selection statements

๐ŸŽ’ Resources:
- Example: here
- Short video (<3min): here
- Articles: Here 1 | Here 2

๐Ÿฆถ Quick Start:
- Get the quick-start code from here.

โœจ Dabs of challenges: here

๐Ÿ“… Submissions: Sunday Morning, 2:00 LT

๐Ÿช Send your submissions in the comments.

@WeeklyCoder | Week 16
๐Ÿ’ช Confidence comes after mastering the fundamentals.

I look back to Times Table as one of the first things that started my love for Math back in elementary school.

The sense of accomplishment that came with memorizing and understanding the times table sparked my curiosity and enthusiasm for exploring further mathematical ideas and challenges.

๐Ÿ’ก Not to be mistaken for being too easy to do, this week's coding challenge dares you to be creative while creating the humble Times Table.

๐Ÿฅ… Goal: To create a program that generates and displays the times table for any given range of numbers. For instance, an input of 12 would generate and display a 12 x 12 Times Table.

โœ๏ธ Recommended Learning:
- for loop
- textSize (), textAlign ()
- textFont (), createFont ()

๐Ÿฆถ Quick Start:
- Get the quick-start code from here.

โœจ Dabs of challenges: here

๐Ÿ“… Submissions: Sunday Morning, 2:00 LT

๐Ÿช Send your submissions in the comments.

@WeeklyCoder | Week 17
๐Ÿš Fibonacci Time!

Got ya a breeze this week!

๐Ÿ’ก The Fibonacci sequence can be used to describe the number of petals on a flower, paintings, structural design, human anatomy, and more.

๐Ÿ–‹ It is a sequence in which each number is the sum of the two preceding ones.

It begins like this: 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, ...

๐Ÿฅ… Goal: Print the first n Fibonacci sequence.

โœ๏ธ Recommended Learning:
- for loop

๐Ÿฆถ Quick Start:
- Get the quick-start code from here.

โœจ Make it more exciting:
- Check whether a given number is a Fibonacci number

๐Ÿ“… Submissions: Sunday Morning, 2:00 LT

๐Ÿช Send your submissions in the comments.

@WeeklyCoder | Week 18
๐Ÿ‘2
โž— Wait! But can you divide?

Easy as it is, don't mistake this week's challenge for being too straight forward.

๐Ÿฅ… Goal: Make a program to keep dividing two given numbers until a given number of digits are obtained after the decimal point โ€” just as you would do a long division by hand.

Find example and more here.

๐Ÿง  Needless to say, the point is not the answer but your approach. Seek not for a shortcut with this one.

๐Ÿงช Testing numbers: 31/13, 1089/23

โœ๏ธ Recommended Learning:
- loops
- Arithmetic operators (esp. / % )
- Division by Integer

๐Ÿฆถ Quick Start:
- Get the quick-start code from here.

โœจ Make it more robust:
- Make it into a function that returns a String. Eg: divide (31, 13, 50) to mean 31/13 and give 50 digits after the decimal point.
- Support for floating point inputs
- Support for negative numbers
- Handle exceptions such as division by 0

๐Ÿ“… Submissions: Sunday Morning, 2:00 LT

๐Ÿช Send your submissions in the comments.

@WeeklyCoder | Week 19
๐Ÿ’ด "10แ‰ฅแˆญ แŠซแˆˆแˆฝ 50แ‰ฅแˆญ แˆแˆ˜แˆแˆตแˆแˆฝ"

That's a typical reply of minibus conductors when they're given higher denominations above the total fare.

As they are often short of changes (as smaller denominations), they would much rather give back changes as higher denominations.

Click here to find an illustrative example case.

๐Ÿฅ… Goal: To enable a more efficient management of change (of smaller denominations).

๐Ÿ’ก Consider Denominations (ETB):
1, 5, 10, 50, 100, and 200

โš™๏ธ Task: Click here to get the specific tasks for this coding challenge.

โœ๏ธ Recommended Learning:
- Selection statements (if, else if, else | Ternary Operator (? :)
- Arithmetic operators (+ -)

๐Ÿฆถ Quick Start:
- Get the quick-start code from here.

โœจ Make it more robust:
- Consider where TA is < TF
- When does this technique not work
- Handle cases of Eg: TF: 370, TA: 400, AA: 20 HC: 50
- Sharing amongst multiple passengers

๐Ÿ“… Submissions: Sunday Morning, 2:00 LT

๐Ÿช Send your submissions in the comments.

@WeeklyCoder | Week 20
๐Ÿช Who is the goddess of love?

She is a sign of beauty, fertility, and victory. For her, the Sun 'rises' in the West and sets in the East. โ€” Venus, the planet.

One disorienting fact about Venus is that, a "day" there is 243 Earth days. What's more is, a year (one trip around the Sun) there is only 225 Earth days. Shorter than her own day!

๐Ÿฅ… Goal: Given your age on Earth, write a program to accurately calculate how old you would be on Venus:
- [1] based on its day
- [2] based on its year

โœ๏ธ Recommended Learning:
- Variables
- Arithmetic operators (+-*/)

๐Ÿฆถ Quick Start:
- Get the quick-start code from here.

โœจ Make it more robust:
- Let your input be a date of birth (dd-mm-yyyy) than age
- Put the results in the format i Years, j Months, k Days
- Add Hours, Months, and Seconds

๐Ÿ“… Submissions: 30 Earth Hours away

๐Ÿช Send your submissions in the comments.

Happy Women's Day!

@WeeklyCoder | Week 21
๐Ÿ‘2
๐ŸŒˆ Resist Colorfully

Some have 4 bands, some 5, and some 6. The higher the number, the more accurate the value.

Color codes for resistors provides a visual method for quickly identifying the resistance value of a resistor. It's universal, easy to manufacture, familiar, and convenient.

๐Ÿฅ… Goal: Given band colors, determine the resistance in ohms.

๐ŸŽจ Color Chart here

โœ๏ธ Recommended Learning:
- Arrays
- ComboBox
- equals ()
- for loop

๐Ÿฆถ Quick Start:
- Get the quick-start code from here.

โœจ Make it more robust:
- Give users the option to insert 4, 5, or 6 color banded resistors.

๐ŸŒ Resistor Color Code website

๐Ÿ“… Submissions: Sunday Morning, 2:00 LT

๐Ÿช Send your submissions in the comments.

@WeeklyCoder | Week 22
โžฐ So you think you can loop?

You really can't go wrong with mastering the fundamentals in computer programming.

Put your looping skills to the test and get creative with this week's 'pattern' creation challenge!

๐Ÿฅ… Goal: Recreate a set of patterns with loops and selection statements.

๐ŸŽจ Pattern here

โœ๏ธ Recommended Learning:
- loops
- selection statements
- variables
- for loop
- arithmetic operators

๐Ÿ™ Special thanks to: Ethio Telecom for sponsoring delaying the posting of this week's challenge.

๐Ÿ“… Submissions: Sunday Morning, 2:00 LT

๐Ÿช Send your submissions in the comments.

@WeeklyCoder | Week 23
๐Ÿ˜9
๐Ÿ”‹ The Capacity to Resist

This week's challenge is so light you could do it while standing!

๐Ÿฅ… Goal: Create a program that calculates the total resistance/capacitance of a series-parallel circuit โ€” given individual values of resistors/capacitors.

๐Ÿ”Œ Formulas and rules here

โœ๏ธ Recommended Learning:
- selection statements
- variables
- arithmetic operators

โšก๏ธ Bring the Thunder:
- Calculating total Resistance/Capacitance for two or three R/C is one thing, but how could it be done for n Resistors or Capacitors?

๐Ÿ“… Submissions: Sunday Morning, 2:00 LT

๐Ÿช Send your submissions in the comments.

@WeeklyCoder | Week 24