โจ๏ธ Withholding Calculator
Better late than never โ this week ๐
It's not rare that you find tools that apply for other countries but none exist for Ethiopian contexts. Such is the case with this week's challenge.
When dealing with financial transactions, manually calculating VAT and withholding tax can be tedious and error-prone.
This week, letโs create a program that takes a post-VAT or pre-VAT price, calculates the pre-VAT/post-VAT amount, and applies withholding tax if thresholds are met (10,000 for products, 3,000 for services), displaying then both the net payable amount and the withheld amount.
๐ฅ Goal: Given a price, provide selection for pre/post VAT and product/service options. Then calculate the post/pre VAT, withholding amount and net amount. See example calculation here or make a copy of this Sheets template.
โ๏ธ Recommended Learning:
- arithmetic operators
- selection statements (if/else statements)
- functions for reusability
๐ช Submit your code in the comments!
@WeeklyCoder | Week 75
It's not rare that you find tools that apply for other countries but none exist for Ethiopian contexts. Such is the case with this week's challenge.
When dealing with financial transactions, manually calculating VAT and withholding tax can be tedious and error-prone.
This week, letโs create a program that takes a post-VAT or pre-VAT price, calculates the pre-VAT/post-VAT amount, and applies withholding tax if thresholds are met (10,000 for products, 3,000 for services), displaying then both the net payable amount and the withheld amount.
๐ฅ Goal: Given a price, provide selection for pre/post VAT and product/service options. Then calculate the post/pre VAT, withholding amount and net amount. See example calculation here or make a copy of this Sheets template.
โ๏ธ Recommended Learning:
- arithmetic operators
- selection statements (if/else statements)
- functions for reusability
๐ช Submit your code in the comments!
@WeeklyCoder | Week 75
๐ฐ Pendulum Swings
In many scientific and engineering scenarios, especially when dealing with larger swings, the basic formula for a pendulum's period isn't accurate enough. This week, let's use a more precise calculation that takes into account the initial angle of release.
๐ฅ Goal: Create a program that calculates the period of a simple pendulum, incorporating a correction for large initial angles using the expansion series for the complete elliptic integral of the first kind (K(k)).
The program should take the pendulum's length and the initial release angle as input and output the more accurate period.
Here's the formula for K(k) we'll use.
โ๏ธ Recommended Learning:
-
-
-
-
๐ช Submit your code in the comments!
@WeeklyCoder | Week 76
In many scientific and engineering scenarios, especially when dealing with larger swings, the basic formula for a pendulum's period isn't accurate enough. This week, let's use a more precise calculation that takes into account the initial angle of release.
๐ฅ Goal: Create a program that calculates the period of a simple pendulum, incorporating a correction for large initial angles using the expansion series for the complete elliptic integral of the first kind (K(k)).
The program should take the pendulum's length and the initial release angle as input and output the more accurate period.
Here's the formula for K(k) we'll use.
โ๏ธ Recommended Learning:
-
Arithmetic operators-
Math functions (sqrt, sin, pow)-
Loops-
Functions๐ช Submit your code in the comments!
@WeeklyCoder | Week 76
This media is not supported in your browser
VIEW IN TELEGRAM
๐ฎ It's Brick Breaker time!
The Brick Game is a dedicated handheld game that displays games in 10 x 20 grid screen. It was popularized in the early 1990s after being introduced in China in 1989.
๐ฅ Goal: Create a mini clone of the game Block Breaker but in the theme of Brick Games.
You may build on top of this barebones.
Grab a fitting font from here.
Download the Android app from here.
โ๏ธ Recommended Learning:
-
-
-
-
๐ช Submit your code in the comments!
@WeeklyCoder | Week 77
The Brick Game is a dedicated handheld game that displays games in 10 x 20 grid screen. It was popularized in the early 1990s after being introduced in China in 1989.
๐ฅ Goal: Create a mini clone of the game Block Breaker but in the theme of Brick Games.
You may build on top of this barebones.
Grab a fitting font from here.
Download the Android app from here.
โ๏ธ Recommended Learning:
-
text, rectMode-
keyPressed, mousePressed-
loops, selection statements-
functions๐ช Submit your code in the comments!
@WeeklyCoder | Week 77
๐ค It's Machine Learning time!
Let's get a glimpse of the world of computer vision this week โ through a practical application with a problem that hits close to home.
Manually cropping faces from photos using photo editing software is time-consuming. The task this week is, to automate this process using machine learning-based face detection to produce square, face-centered images for an ID-making software.
โ๏ธ Task breakdown:
- Detect faces in each photo using OpenCV
- Crop each face into a square image, ensuring the face is centered with a padding
- Output square images suitable for ID-making software
This streamlines ID photo preparation, saving time and ensuring consistent output.
๐ Resources:
- OpenCV for Processing
- Get started with this code
โ๏ธ Recommended Learning:
-
-
โก๏ธ Bring the Thunder!
- support for slightly rotated photos
- support for mass photo processing
๐ช Submit your code in the comments!
@WeeklyCoder | Week 78
Let's get a glimpse of the world of computer vision this week โ through a practical application with a problem that hits close to home.
Manually cropping faces from photos using photo editing software is time-consuming. The task this week is, to automate this process using machine learning-based face detection to produce square, face-centered images for an ID-making software.
โ๏ธ Task breakdown:
- Detect faces in each photo using OpenCV
- Crop each face into a square image, ensuring the face is centered with a padding
- Output square images suitable for ID-making software
This streamlines ID photo preparation, saving time and ensuring consistent output.
๐ Resources:
- OpenCV for Processing
- Get started with this code
โ๏ธ Recommended Learning:
-
loadImage (), image (), save ()-
mask (), copy (), PGraphicsโก๏ธ Bring the Thunder!
- support for slightly rotated photos
- support for mass photo processing
๐ช Submit your code in the comments!
@WeeklyCoder | Week 78
๐ฉบ Symptom-Based Disease Predictor
Let's use oral exam data to make predictions.
Given this CSV file that maps diseases to symptoms on a severity scale, build a program that asks users to input their symptom severities and returns the most likely disease from the table.
Each row is a disease, each column is a symptom (rated 0โ3). Scale-Meaning.
0 - Absent
1 - Mild
2 - Moderate
3 - Severe
๐ฅ Goal: Build a program that interacts with users to guess the most likely disease from their reported symptoms.
๐ฆถ Steps:
- load and parse the CSV file
- prompt the user to enter their severity for each symptom (0โ3)
- compare the user's input against all diseases
- output the most likely disease
โ๏ธ Recommended Learning:
-
-
-
-
-
-
๐ช Submit your code in the comments!
@WeeklyCoder | Week 79
Let's use oral exam data to make predictions.
Given this CSV file that maps diseases to symptoms on a severity scale, build a program that asks users to input their symptom severities and returns the most likely disease from the table.
Each row is a disease, each column is a symptom (rated 0โ3). Scale-Meaning.
0 - Absent
1 - Mild
2 - Moderate
3 - Severe
๐ฅ Goal: Build a program that interacts with users to guess the most likely disease from their reported symptoms.
๐ฆถ Steps:
- load and parse the CSV file
- prompt the user to enter their severity for each symptom (0โ3)
- compare the user's input against all diseases
- output the most likely disease
โ๏ธ Recommended Learning:
-
Table, loadTable ()-
getRowCount (), getColumnCount ()-
getString (), getInt ()-
sortKeys (), sortValues ()-
.keyArray ()-
similarity/distance calculation (sum of absolute differences)๐ช Submit your code in the comments!
@WeeklyCoder | Week 79
๐1
Weekly Coder
๐ค It's Machine Learning time! Let's get a glimpse of the world of computer vision this week โ through a practical application with a problem that hits close to home. Manually cropping faces from photos using photo editing software is time-consuming. Theโฆ
๐ Read this first: Tough-Love
๐ธ Manual Photo Crop Tool
Last time, we stepped into the world of computer vision โ building a tool to automatically detect and crop faces from photos for ID-making purposes. It works great ... except when ML didnโt.
Not every photo played nice with automated face detection. Sometimes it missed the face or cropped poorly.
So this week, weโre flipping the script โ let's build the user custom and manual control to crop faces from photos.
๐ฅ Goal: Build a Manual Crop Tool where a user can manually position the photo behind a fixed square frame to get the perfect crop.
๐ฆถ Steps: here
โ๏ธ Key Features:
- Panning: on the image (click-drag or arrow keys)
- Zooming: in/out using mouse wheel or +/-
โก๏ธ Bring the Thunder: here
โ๏ธ Recommended Learning:
-
- mask (),
-
- PGraphics
๐ช Submit your code in the comments!
@WeeklyCoder | Week 80
๐ธ Manual Photo Crop Tool
Last time, we stepped into the world of computer vision โ building a tool to automatically detect and crop faces from photos for ID-making purposes. It works great ... except when ML didnโt.
Not every photo played nice with automated face detection. Sometimes it missed the face or cropped poorly.
So this week, weโre flipping the script โ let's build the user custom and manual control to crop faces from photos.
๐ฅ Goal: Build a Manual Crop Tool where a user can manually position the photo behind a fixed square frame to get the perfect crop.
๐ฆถ Steps: here
โ๏ธ Key Features:
- Panning: on the image (click-drag or arrow keys)
- Zooming: in/out using mouse wheel or +/-
โก๏ธ Bring the Thunder: here
โ๏ธ Recommended Learning:
-
loadImage(), image(), translate(), scale(), rotate()- mask (),
copy(), save()-
mouseDragged(), mouseWheel(), keyPressed()- PGraphics
๐ช Submit your code in the comments!
@WeeklyCoder | Week 80
Weekly Coder
Photo
๐ Fuel Theft Detection
This week, let's analyze vehicle telemetry to tackle a critical problem: detecting fuel theft. By processing GPS and fuel data, we can identify suspicious fuel level changes.
๐ฅ Goal: Build a Fuel Theft Detector that processes a CSV of vehicle telemetry data to identify stops and flag fuel changes as theft or fillings.
We'll use this real-world data as input.
Real life is messy. Sensors can give readings that are all over the place when a vehicle is moving uphill or down hill or when it changes.
So to do this, we'll only consider fuel level changes as either thefts/fillings if they happen while the vehicle is stationary (speed = 0 kph). We'll take as a stop a duration of โฅ 3 minutes.
Filling if Fuel Diff > 1.0 and stop duration โฅ 3 minutes and Theft if Fuel Diff < -1.0
โก๏ธ Bring the Thunder:
- Output a summary report (events and amounts) to a csv file.
- Include the associated GPS coordinates to indicate where theft or fillings may have happened.
โ๏ธ Recommended Learning:
- loadTable(), saveTable(), nf
- SimpleDateFormat
- Loops and conditionals
- .replace (), .contains ()
๐ช Submit your code in the comments!
@WeeklyCoder | Week 81
This week, let's analyze vehicle telemetry to tackle a critical problem: detecting fuel theft. By processing GPS and fuel data, we can identify suspicious fuel level changes.
๐ฅ Goal: Build a Fuel Theft Detector that processes a CSV of vehicle telemetry data to identify stops and flag fuel changes as theft or fillings.
We'll use this real-world data as input.
Real life is messy. Sensors can give readings that are all over the place when a vehicle is moving uphill or down hill or when it changes.
So to do this, we'll only consider fuel level changes as either thefts/fillings if they happen while the vehicle is stationary (speed = 0 kph). We'll take as a stop a duration of โฅ 3 minutes.
Filling if Fuel Diff > 1.0 and stop duration โฅ 3 minutes and Theft if Fuel Diff < -1.0
โก๏ธ Bring the Thunder:
- Output a summary report (events and amounts) to a csv file.
- Include the associated GPS coordinates to indicate where theft or fillings may have happened.
โ๏ธ Recommended Learning:
- loadTable(), saveTable(), nf
- SimpleDateFormat
- Loops and conditionals
- .replace (), .contains ()
๐ช Submit your code in the comments!
@WeeklyCoder | Week 81
Weekly Coder
๐ BetterClip: Clipboard Bank
Ever found yourself copying something useful, only to accidentally overwrite it with something else seconds later?
I've been there. Windows has a clipboard history feature built in โ BUT it's limited, buggy, and doesn't quite do enough for real-world use.
๐ The built-in Windows clipboard:
But we can do better โ and we will.
๐ฅ Goal: To build a better clipboard manager. BetterClip will have:
โ๏ธ Recommended Learning:
-
-
-
-
-
๐ช Submit your code in the comments!
@WeeklyCoder | Week 82
I've been there. Windows has a clipboard history feature built in โ BUT it's limited, buggy, and doesn't quite do enough for real-world use.
๐ The built-in Windows clipboard:
- Stores only 25 items
- Clears everything on restart
- No search or categorization
- No support for files
- Misses to record things sometimes
- Does not have searchability
- Does not have categorization
- and a lot more
But we can do better โ and we will.
๐ฅ Goal: To build a better clipboard manager. BetterClip will have:
- Unlimited history
- Searchability
- Persistent storage across reboots
- Auto-deletion of old records
- Restore on startup
- Support for text, images, files, URLs
- Tabs for categorization [All | Texts | Images | Files | URLs | +]
- Option to pin
- Global hotkey to launch
- Incognito mode to temporarily disable recording
โ๏ธ Recommended Learning:
-
java.awt.Toolkit | pyperclip-
JIntellitype for Global Hotkeys-
the object Object and DataFlavor-
saveStrings ()-
List, LinkedHashMap๐ช Submit your code in the comments!
@WeeklyCoder | Week 82
DJ Robot
Music in factories boosts morale, productivity, and focus. But manual playlist management often leads to forgotten starts, missed pauses, and repetitive songs.
๐ฅ Goal: This week, let's build a customizable, offline music scheduler for factory Bluetooth PA systems โ with the following features:
- automated start/stop at clock-in/out
- pause during lunch breaks (or custom lunch playlist)
- day-specific playlists
- easy way to add/remove songs in playlists
โก๏ธ Bring the Thunder:
- schedule overrides no playback on Sundays or specific dates (religious holidays or during no work days)
- bluetooth PA system integration such that it looks for the PA system before playing music
- song rotation to avoid repetition
โ๏ธ Recommended Learning:
-
-
-
-
-
๐ช Submit your code in the comments!
@WeeklyCoder | Week 83
Music in factories boosts morale, productivity, and focus. But manual playlist management often leads to forgotten starts, missed pauses, and repetitive songs.
๐ฅ Goal: This week, let's build a customizable, offline music scheduler for factory Bluetooth PA systems โ with the following features:
- automated start/stop at clock-in/out
- pause during lunch breaks (or custom lunch playlist)
- day-specific playlists
- easy way to add/remove songs in playlists
โก๏ธ Bring the Thunder:
- schedule overrides no playback on Sundays or specific dates (religious holidays or during no work days)
- bluetooth PA system integration such that it looks for the PA system before playing music
- song rotation to avoid repetition
โ๏ธ Recommended Learning:
-
Minim library for audio playback-
java.util.Timer for scheduling automation-
java.io.File for playlist/file management-
List, HashMap, +-
JIntellitype for special media keys (Play, Pause, Stop, +)๐ช Submit your code in the comments!
@WeeklyCoder | Week 83
Weekly Coder
๐ฐ Receipt Detective A cashier at a boutique is tasked to verify the validity of a transaction using an RN (Reference Number). To do this, she manually creates a link using an RN and the last 8 digits of their account number. Template Link: https://apps.โฆ
๐งพ StitchPay: Statement Consolidator
You'd think banks such as CBE, established as they are, would include something basic as a Payer name in a bank statement they send. But you'd think wrong. ๐คฆโโ๏ธ
So, this week, let's extend our Receipt Detective challenge of Week 59 to build a Statement Consolidator that takes in an incomplete bank statement and gives back something complete.
๐ฅ Goal: Given the account number of a Receiver, build a program that takes in a list of Reference numbers and gives back a complete statement as .csv file.
The transaction section of a bank statement should sensibly include these โ but as a start, let's build a payer name fetcher.
๐ Format here.
๐ฆถ Build on top of this example.
โก๏ธ Bring the Thunder!
- So generate a complete Bank Statement as a CSV from a list of Reference numbers.
โ๏ธ Recommended Learning:
-
-
-
๐ช Send your submissions in the comments!
@WeeklyCoder | Week 84
You'd think banks such as CBE, established as they are, would include something basic as a Payer name in a bank statement they send. But you'd think wrong. ๐คฆโโ๏ธ
So, this week, let's extend our Receipt Detective challenge of Week 59 to build a Statement Consolidator that takes in an incomplete bank statement and gives back something complete.
๐ฅ Goal: Given the account number of a Receiver, build a program that takes in a list of Reference numbers and gives back a complete statement as .csv file.
The transaction section of a bank statement should sensibly include these โ but as a start, let's build a payer name fetcher.
๐ Format here.
๐ฆถ Build on top of this example.
โก๏ธ Bring the Thunder!
- So generate a complete Bank Statement as a CSV from a list of Reference numbers.
โ๏ธ Recommended Learning:
-
URL, InputStream, File, FileOutputstream-
PDFbox, PDFTextStripper-
.openStream (), .deleteOnExit ()๐ช Send your submissions in the comments!
@WeeklyCoder | Week 84
Inclusive Modular Knapsack
A school is looking to buy every type of item for their students โ notebooks, pencils, and erasers โ but it has capped the total spend at 2,000 Br (t = total).
๐ฅ Goal: This week, build a solver that finds how many packs of each supply type can be bought so that:
- every item type is included at least once
- quantities are unlimited
- total cost is no more than 't' Br but can be a little under
Example:
- Notebook pack โ 150 Br
- Pencil pack โ 90 Br
- Eraser pack โ 60 Br
- Target budget t = 2000 Br
โก๏ธ Bring the Thunder: here
โ๏ธ Recommended Learning:
-
-
-
@WeeklyCoder | Week 85
A school is looking to buy every type of item for their students โ notebooks, pencils, and erasers โ but it has capped the total spend at 2,000 Br (t = total).
๐ฅ Goal: This week, build a solver that finds how many packs of each supply type can be bought so that:
- every item type is included at least once
- quantities are unlimited
- total cost is no more than 't' Br but can be a little under
Example:
- Notebook pack โ 150 Br
- Pencil pack โ 90 Br
- Eraser pack โ 60 Br
- Target budget t = 2000 Br
โก๏ธ Bring the Thunder: here
โ๏ธ Recommended Learning:
-
Coin change / knapsack dynamic programming-
Residue arithmetic to handle multiples-
Data structures: arrays, maps, +@WeeklyCoder | Week 85