₦airaland Forum

Welcome, Guest: RegisterLoginWith GoogleTrendingRecentNew

Stats: 3,325,797 members, 8,423,785 topics. Date: Wednesday, 10 June 2026 at 09:50 AM

Toggle theme

Fr4nk's Posts

Nairaland ForumFr4nk's ProfileFr4nk's Posts

1 2 3 (of 3 pages)

EducationShould I Convert My Utme To De? by Fr4nk(op):
Hello, I need help in making this decision.
I scored 259 in this year's utme exam and I scored 9/16 points in this year's jupeb exam.

I'm having serious doubts about whether or not I should convert my utme to de, should I really forfeit 259/400 in favour of 9/16.
I wish to study computer science at unilorin.
ProgrammingRe: Lollzzzz, I'm Now A C++ Master by Fr4nk(m): 3:22pm On Oct 25, 2022
TastyFriedPussy:
tongue mehhn, this feeling is just too sweet tongue I've been learning C with classes for not more than two weeks and I feel like a pro already, I'm even nursing the idea of beginning to apply for C++ jobs with the little knowledge I have lollzz grin here's a little code demo to show what I've learnt so far,

#include <iostream>
#include <string>

int main(){

int string name;
int string age;

std::cout << "Hello, please type in your name" << std::endl;

std::cin >> name >> std::endl;
std::cin >> age >> std::endl;

std::cout << " Hello " << name << " you are " <<age << " years old << std::endl;

return 0;


}


tongue

@sqlPAIN and other C++ devs, how did I do?
Please mere web developers should stay outta this thread, you won't understand grin tongue
I'm just going to assume this is coding humour, because if this is all you have learnt so far, it would be funnier if you weren't joking
EducationRe: How Do I Know If I'm Qualified For Admission In Unilorin. by Fr4nk(op): 2:46pm On Oct 19, 2022
duro4chang:
No unless they have changed. You can Google for their past questions online to download.
Thank you so much.
EducationRe: How Do I Know If I'm Qualified For Admission In Unilorin. by Fr4nk(op): 1:55pm On Oct 19, 2022
duro4chang:
As from 60% and above. Their CBT exam is about forty questions and English will take about thirty. The rest will be Current affairs.
That's nice, but are there no mathematics, chemistry or physics questions?
EducationRe: How Do I Know If I'm Qualified For Admission In Unilorin. by Fr4nk(op): 1:49pm On Oct 19, 2022
duro4chang:
Yes but you must score good mark in post -UTME.
Okay, like how good must my score be, to be on a safer side
EducationHow Do I Know If I'm Qualified For Admission In Unilorin. by Fr4nk(op): 1:37pm On Oct 19, 2022
I'm hoping to apply for unilorin admission and I need help knowing if I'm actually qualified to gain admission without fear that I might get rejected or change of course.
The course I wish to study is computer science.
I scored 259 in this year's jamb, and I heard 220 is the cutoff for computer science in unilorin, and I scored 2As, 6Bs and 1C in my NECO.
If I write post utme and pass, will I be guaranteed admission?
Or are there some other factors involved
ProgrammingRe: What's The Best Piece Of Code Ever Written By You? by Fr4nk(m): 12:11am On Jun 20, 2022
Babtunz:
This is super cool!
What language did you write these projects in?
Python
ProgrammingRe: What's The Best Piece Of Code Ever Written By You? by Fr4nk(m): 9:18pm On Jun 19, 2022
recently I've been writing a lot of code to solve numerous codewars Kata, it's so hard to choose the best one though, because I love all of them,

For now I'll just pick my sudoku solution validation algorithm and my N×N matrix determinant calculator
ProgrammingSwitching From Windows To A Linux Distro, Should I Or Should I Not Consider by Fr4nk(op): 7:49pm On Jun 03, 2022
Hey Guys,
I'm hoping on getting a new laptop soon for programming, I have been coding on my phone and tablet and I have really gotten used to the termux terminal, since android is basically Linux, termux is just like the Linux terminal and its sweet af
Unfortunately, windows cmd kind of sucks and I'm not sure if I really want to be using it,
Mac OSX bash terminal is very similar to the Linux terminal and I would really love to use that if not that a good macbook might be a little bit above my budget (and I'm not really an apple person, I just like the Terminal that's all)

The cheapest alternative would be install a Linux distro like MintOS or Ubuntu,
I don't know if it's going to be a safe process or not,
Can I have both windows and Linux installed so I can switch between OSes,
Or should I make my Laptop Linux Only, and will I regret the latter decision

I would really be relieved if there was a better way to use Linux without uninstalling windows or installing it alongside Windows, maybe if I could boot it from a flash drive or use it Virtually while on windows

Thanks in advance for your answers
ProgrammingRe: I Want To Go Into Tech; What Field Should I Choose? by Fr4nk(m): 1:45pm On Jun 03, 2022
Laryfrosh:
See Bros leave talk! Most persons that got into tech, got in because of the money... But along the line, what keeps you going is the passion... I ain't gonna deny that...
I started learning Web dev in February this year... I can boldly tell you that two things attracted me to tech.
1. The pay
2. The fact that you can work from home. Then, you get to live a low-key life.
But along the line, I became passionate about it.
I have rejected a job in the banking industry just to focus on this part even though I don't know or it is not sure I am gonna get a job so soon after learning and I don't have so much financial strength to carry on for so long but I have chosen that I am gonna stick to it.
I got in with the mindset of just learning front-end development but now, I virtually just want to know everything... Like I want to know how the web works fully(from Front-end to back-end) and even other fields of tech. I am just so curious to acquire knowledge and know more about the field(not just web development alone).
So, telling someone who knows nothing about tech to be driven by passion is like telling a man to fall in love with an woman he is never met or spoken to before.
Something will definitely drive you into the industry but what is gonna keep you is most likely gonna be the passion which you develop as time goes on...
So, please let's minimize this passion stuff for newbies trying to break into the field.
my thoughts though
Its really cool that u ended up developing the passion, yeah maybe you're right
ProgrammingRe: I Want To Go Into Tech; What Field Should I Choose? by Fr4nk(m): 11:06pm On Jun 01, 2022
airsaylongcome:
Gbam! This is why I am forever in support of people getting a degree in Computing. A lot of the tools used today were the result of of University R&grin. If everyone goes to a bootcamp or tech hub in Nigeria who is going to drive research? You aren't off topic at all
I'm glad someone agrees
ProgrammingRe: I Want To Go Into Tech; What Field Should I Choose? by Fr4nk(m): 7:56pm On Jun 01, 2022
I don't mean to be off topic, but what can we actually do to kill the hype around tech,
I think it's unsettling that a lot of people are migrating into tech careers just for the pay,
I mean, it would be nice to come across a Nigerian doing research and developing some cutting edge advancement in tech, who knows, maybe if we had more people like that, technological innovation could be one of those things that would make Nigerian Standout just like Music has done.

I don't know if this makes any sense but, its on here anyway
ProgrammingRe: Must Everybody Go Into Tech Or Learn Coding? by Fr4nk(m): 12:22am On Jun 01, 2022
Fr4nk:
arguing is always a pain,
I think those of us that got into tech not because of the hype should just continue doing what we are good at,
I decided to learn programming because I was very obsessed with computers at a very young age, I was computer literate at a very early stage, I learned to code purely out of interest, and now that I know that coding is what I'm good at I decided that I will spend the rest of my life honing my skills and building a career out of it, and looking for ways in which others can benefit from it. I have a thing for immediately running from anything that becomes the hype (especially in this country) because people tend to rush to the trendiest thing for wrong reasons.
Tech will not replace anything, it could just enhance or improve the way other things are done
Plays used to be watched at theatres, then the cinema, then the television, now with anything that has a screen (phone, laptop, etc), maybe soon with holograms, VR/AR

Tech has made it more convenient to watch plays (or movies/shows as we call them today) over the years, but it never cancelled out the need for the Actors,Actresses and the production crew

Tech has always existed as a means of solving human problems even from the time of the early cave men, its not a trend that everbody needs to hop on to
ProgrammingRe: Must Everybody Go Into Tech Or Learn Coding? by Fr4nk(m): 12:13am On Jun 01, 2022
arguing is always a pain,
I think those of us that got into tech not because of the hype should just continue doing what we are good at,
I decided to learn programming because I was very obsessed with computers at a very young age, I was computer literate at a very early stage, I learned to code purely out of interest, and now that I know that coding is what I'm good at I decided that I will spend the rest of my life honing my skills and building a career out of it, and looking for ways in which others can benefit from it. I have a thing for immediately running from anything that becomes the hype (especially in this country) because people tend to rush to the trendiest thing for wrong reasons.
Tech will not replace anything, it could just enhance or improve the way other things are done
ProgrammingRe: I Want To Go Into Tech; What Field Should I Choose? by Fr4nk(m): 11:50pm On May 31, 2022
TechLiberatedMe:
Hello Tech Seniors,

I graduated from the University about a decade ago and I'm currently in my early thirties.

I did not study Computer Science, Engineering, Maths, Physics or other Math-related courses. My mathematical prowess is fair.

I made up my mind to go into Tech because I did an appraisal of my journey since I finished NYSC and realised I would have been very fulfilled if I ventured into Tech since then. The last one year has been terrible for me. I started thinking about Tech since late last year. I recently came across one or two threads where Tech guys gave testimonies and their comments gave me hope that Tech would change my life and my story.

I feel that I would even regret more in the next 10 years if I don't start something in Tech NOW! Tech is both the present and the future.

I have come to a conclusion that one can hardly regret ever going into Tech.

I got to know that there are several fields of Tech one can specialise in. I also got to know that some people started in one field and later dropped it for another field because they realised the first one was not for them.

I also hear that some people are in Tech but their foundation is faulty.

How do I know the aspect of Tech I will enjoy and at the same time excel in? Kindly guide me in every ways you can. I am coming late already and there is no time for me to gamble or do trial an error unlike a 16-year-old Jambite.

The following might be helpful in helping me make a decision:

1. I love to solve problems. In fact, solving problems gives me so much joy. There are times I skip sleep just because I want to find solution to a particular problem.

2. I love it when I am the staff/individual that got it done.

3. I am competitive (healthy competition). I love to look at people that are better than me and try to become as good as or better than them. I always believe that I can do it since they could also do it.

4. I love a career that pays very well even if not the best. As a result of this, I might be tempted to want to switch to a Tech career that has the best prospects and pays the highest. In that case, maybe it'd be advisable I start a career in that aspect I would eventually be tempted to port to.

5. Kindly also say something about Tech careers that thrive in the UK, US or Canada because one might have a cause to relocate in the future.

I look forward to reading from the seasoned and incisive Tech Seniors.

Thank you.

cc: Seun
tensazangetsu20, Misterrobot, reactjs, hannania, Wisdomremz, Ejiod, mcemmy0z and other Seniors I did not mention

Please don't forget to help me mention other Seniors that can give incisive contributions.
Don't take this as me trying to discourage you, but Sir, you don't need to go into tech, doing something in tech WILL not magically change your life, you are free to try if you're up for the challenge, but I think you should look into other options were your strengths will benefit you, instead of wasting time jumping into tech that might not even favour you.
ProgrammingRe: I Want To Go Into Tech; What Field Should I Choose? by Fr4nk(m): 11:42pm On May 31, 2022
ProgrammingRe: I Want To Go Into Tech; What Field Should I Choose? by Fr4nk(m): 11:35pm On May 31, 2022
What exactly did you study at the university, have you thought about finding a field in tech closely related to that?
ProgrammingRe: I Want To Go Into Tech; What Field Should I Choose? by Fr4nk(m): 11:32pm On May 31, 2022
TechLiberatedMe:
Thank you for your input. What field would you say pays the highest and what field would you say their professionals are most envied?
Hi There,
I really think your main focus right now shouldn't be which pays the highest or which is most envied, there are really no standard way to determine those things, today field A might be very lucrative, in the next few years to come field B might be the most lucrative,
Try not to let "Highest Pay" be your only motivation because you might not make it very far before bailing out.

i don't know why some people get the impression that Tech is the new Oil, I'm not sure if it actually works that way
ProgrammingRe: I Want To Learn Programming. Which Language Should I Start With? by Fr4nk(m): 12:27am On May 31, 2022
Cassahav:
Why is html and css others
Because they are not programming languages
ProgrammingRe: Codewars.com Coding Challenges by Fr4nk(op): 9:00pm On May 30, 2022
Temmylee01:
I agree with you, but those YouTube class are somehow complicated reason is they hardly explain very well. The guy will just be talking and talking.
Have you tried reading books, in my opinion, books are pretty good, as long you understand English grin
The point is that yoiu can always go at your own pace with books

As for YT vids, you can just have my number (I program in python) I can try to explain those concepts that are hard to grasp, and you can also jot down some of those terms so you can Google them later, if you're subscribed to a good channel then you're getting the best explanation you could possibly need
ProgrammingRe: Codewars.com Coding Challenges by Fr4nk(op): 4:40pm On May 29, 2022
Temmylee01:
I'm getting my laptop tomorrow morning, nd I should be starting to learn programming this week. My prob now is who to put me through since I'm in abj.
Cool bro, but your location doesn't matter, I learnt recursion from a professor in Germany right from my home here in Lagos, learn to make the internet your greatest weapon as a programmer, its not cheating even if you ask google for something as simple as "how do I terminate a for loop", forget that BS that people say about relying too much on Google for your answers, You need to Google everything if you have to because nobody in abuja or anywhere else will be able to answer all your questions,

Watch tutorials on YouTube, and read programming blogs you'll be okay
ProgrammingRe: I Want To Learn Programming. Which Language Should I Start With? by Fr4nk(m): 4:33pm On May 29, 2022
avalon7:
Easy to learn and has a wide range of applications, hence a beginner friendly language. Don't just learn a programming language for learning sake, you should figure out what aspect of tech you are interested in and learn the tools you need to succeed.

There's Software development, web development, game development, cloud and database management and Data science/machine learning/AI. Each of these areas require different skill sets, so do your research so you don't end up wasting your time learning things you may never use. Good luck
Yes Comrade, my point exactly, pick an area of specialization first, its really important
ProgrammingRe: I Want To Learn Programming. Which Language Should I Start With? by Fr4nk(m): 4:32pm On May 29, 2022
Auskyd:
This is very refreshing, thank you so much for the time spent.

Ehn, I chose JavaScript as an entry point into the world of tech and programming, not because I really want to do web development. I asked around on the internet and everyone seemed to point me towards JavaScript as the language I should start with, so here is I am.

And yes, I want to make sure I know it like the back of my hand, before deciding to move on to other languages which might earn me money in the future. For now however, it's solely to satisfy this itch that I have to learn something tech so I don't look like an idiot in decades to come lol. Let me move with my mates, even if it's for the sake of knowledge alone.

Once again, I thoroughly appreciate your time and effort. God bless you bro.
coding isn't the only thing u can Learn in tech bro, but it sure is interesting,
You'll go pretty far if money isn't your only motivation,

Since you're already learning JavaScript, web development is one of its popular uses, but if you're not so sure about being a web developer (after doing your research of all the web development entails) then you should still take your time and think of a field to dive into.

Remember, pick a field first then language later,

Here's a scenario:
You want to get into the electronic industry, someone advised you to learn how to use a screwdriver, its a very popular and a lot of people in this industry are using it in their daily work, so you decided to spend weeks learning how to use a screwdriver professionally,
Now you're done with training and you want to start earning money with your skill, but unfortunately there aren't a lot of people looking to hire professional screwdriver operators.
Instead, spots were open for electronic appliance repairs/maintenance, appliance assembly personnel, etc (I don't know, I just made those up, I don't know if they're real jobs)

What's the problem here?
Well, just like you a maintenance guy knows how to use a screwdriver very well, but, that isn't the only thing he knows,
He probably decided that he was going to become a maintenance guy before learning to use a screwdriver, unlike you he didn't have to spend weeks learning how to use it, maybe he learnt the basics in just a few hours, and he also learnt how to apply that to other things he'll probably be learning for his job

I hope this scenario helps
ProgrammingRe: I Want To Learn Programming. Which Language Should I Start With? by Fr4nk(m): 1:08am On May 29, 2022
Auskyd:
I read this 3 times! Guy you go be very very good teacher! Chai Chai chai. I just started JavaScript like on Monday here, cos I want to have a working knowledge of something tech in this my life so that I don't look like mumu in the future lol, and I think this post has been really insightful!

Abeg, at what point in my JavaScript training do I incorporate DSA?

Thanks in anticipation!
Hi, Thanks for the compliment, maybe I might be a good teacher if I had students who would read all the shit I write word for word and understand the whole thing LOL,

Since you said you're learning JavaScript I hope you must already decided that Web Development is the path for you, and you didn't just jump at a random language just because you want to know something in tech, I'll just assume its not the latter.

You can pretty much learn DSA anytime you like as long as you have mastered the basics of programming,
There are general basic stuff you should know which apply to any language you're learning, any programming language is incomplete without them,
These are:
I/O (input and output): this should be the easiest and you already know this by now, even if you just started learning programming 10 minutes ago

Data Types: these are your integers, floats, strings etc, do more research on this for JavaScript, I think it has other weird data types LOL

Conditionals: this refers to your if...else statements

Loops: for and while loops, these are pretty handy for iterating a bunch of stuff in an array or any other iterable objects

There are more basic stuff you need to MASTER before learning DSA,
or at least before trying to learn it,
Because you'll have to get very comfortable with them before going for some more advanced shit like recursion,

Some algorithms like Binary search use recursion, and believe me it can be so damn hard to understand especially if you're a beginner, even at my level I still can't understand code with a recursive function without a pen and paper to actually figure out what's going on

Its 01:04 and I'm feeling a little bit sleepy and i'm not sure if I'm typing right LOL

Just know that there is a lot to learn before jumping into DSA, if u noticed, it was the last thing I mentioned in my last post, make sure you get very comfortable with your language and its syntax, and also some other programming concepts like Recursion (there are more),

This post is poorly composed and of lower quality than last one, please forgive me for my sloppy writing.

Summary:
Learn DSA when you're already fluent in your chosen language, in my opinion you must already know how to write JavaScript just like you write English, by fluency I'm mostly talking about syntax and not some other fancy stuff, also try to find DSA tutorials for your preferred language whenever you're ready because most DSA tutorials focus on C, C++, Python and Java, also you should try solving coding challenges on codewars.com or hackerrank.com (maybe not now though) but they might just help u improve your problem solving skills, imagine having a high rank on codewars.com, its worth bragging about (sometimes) because those questions can get really difficult, you definitely won't look like a "mumu" then LOL

Good Luck Bro
wink
ProgrammingRe: I Want To Learn Programming. Which Language Should I Start With? by Fr4nk(m): 6:37pm On May 27, 2022
I know the thread is about programming languages but I feel beginners should be made aware of more options,
If you're a complete noob hoping to hop on the tech train you're welcome, but it would take a lot more than some random person's advice on a Nairaland forum to get you started. (Make sure you do your own research, preferably online too)

If you found this thread through a Google search, then congratulations, you probably have mastered a fundamental skill every programmer should have, and that's "Google Fu" (I borrowed the word),
No one knows everything, that's why the internet exists, if you ever face a problem with your code in the future then there is a high possibility that someone else on this planet must have faced the same problem and asked for a solution, you'll definitely find an answer if you ask properly (Google is not a wizard, hence it cannot read your mind. ...at least not yet), and if you don't find an answer to a question similar to yours, you can always ask on sites like Quora, stackoverflow etc.

I'm assuming you already know what language you want to learn,
If you don't, then forget about learning a programming language for now, instead take sometime to think about what you really want to do before you invest in learning a programming language, there might even be a chance that your main interest might not even require you learning a programming language,
Examples are Data science, Artificial intelligence engineering, Cloud computing, Database administration, cyber security, Blockchain technology (I'm not talking about cryptocurrency, Block chain tech has been used to build other useful tools like the git VCS), Cryptography, Ethical hacking, Robotics, Internet of Things, etc
Do a Google search on the one that sounds most interesting to you

One mistake you should never make is choosing a path because its the latest trend, the thing about trends is they always come and go,
Instead, try to choose a career path and stick with it.

When you have finally figured out exactly what you want to do in tech, you'll want to do research and find out which technologies you'll be using, this is why I asked you to forget about learning a language first, imagine spending months learning python only to discover that you're actually interested in Embedded systems and Hardware programming, sure, no knowledge is wasted but you wouldn't be learning a second programming language if you had decided to pick a field before learning to program.
Check out the first few posts in this thread to gain some insights about some languages you might need to know for your chosen path, alternatively, "just Google it"
Here's an example "What language is used in Embedded systems programming?"

Okay, congrats,
You have chosen a career to stick with and you're already learning the relevant stuff
But I guess that's not all

Don't underestimate the usefulness of MATHEMATICS in programming, believe me this could be one of the things that might really give you a boost in your programming progress, and I'm not talking about simple arithmetic here,

Take a look at this : https://stackabuse.com/mathematical-proof-of-algorithm-correctness-and-efficiency/
Mathematical proof of algorithm correctness,
Efficiency is a commonly used term when it comes to algorithms, an efficient algorithm is one that gets the job done in the least amount of time and with less memory,
And that's just one way you could really use mathematics to your advantage, there are other amazing topics which would really help you write better software.

Anyone can code, but that doesn't make them programmers, just like how anyone can write, but that doesn't make them a writer,
Its what you do with that ability to code or write that sets you apart.
P.S you don't have to be a maths guru to utilize mathematics in your programming, its completely learnable for everyone

Another thing you should consider is Data Structures and Algorithms, I think its safe to assume, that 99% of the code you must have written up until this point is really slow and inefficient, that's where knowledge of DSA could come in handy, the best part is that it applies to every programming language, since an algorithm is list of instructions, a good algorithm must be one that can be implemented in any language at all, take binary search for instance, its not the same code if you were to implement it in python, C++ or Javascript, but its the same step of instructions just written in different flavours,
Another reason you should consider learning DSA is that most interviews at FAANG companies (This refers to pretty much every big tech company out there not just Facebook,Apple,Amazon,Netflix and Google) will require you to solve some specific coding questions using what you must have learnt on DSA (remember, efficiency is really important)

My back really hurts now and I've been typing for so long, but there still so much I want to share with you,
I think I'll wrap it up here

Remember what I said at the beginning of this post
"it would take a lot more than some random person's advice on a Nairaland forum to get you started. (Make sure you do your own research, preferably online too)"

Please do your own research,

I don't know everything and I might have probably made some errors up there
So feel free to make your own additions and corrections

Good Luck to every beginner here !!!
winkwinkwink
ProgrammingRe: I Want To Learn Programming. Which Language Should I Start With? by Fr4nk(m): 5:19pm On May 27, 2022
olusegunadex:
Well, I’ll say… start with the easy ones first… then you can start moving up the ladder gently…

For a start, if I were to start again, I’d start with;

HTML & CSS - the very fundamentals

Then proceed to JavaScript.

A knowledge of HTML & JavaScript will make it easy to build really functional web development projects

Then afterwards, I’d dive into JavaScript libraries and frameworks…

If I still feel like exploring after JavaScript, I’ll go with Python or Ruby on Rails…

Based on experience, it’s an easy roadmap to follow.

This blog post might be helpful: https://devsntechies.com/is-coding-really-hard-to-learn-advice-for-beginners/?amp=1
Is web development the only way to go for beginners? Why does it feel like other options aren't explored in more detail
Why hasn't anyone mentioned mathematics, programming is different from coding, it will take a long time from someone starting with HTML and CSS to get into real programming, I wonder why we aren't advising beginners to take up mathematics, it would really help out when they start learning advanced programming concept, afterall programming and everything computer science related is a subset of mathematics. Ever heard of the Turing Machine? or lambda calculus or Regular expressions?
PhonesRe: Phone Engineers On Nairaland Willing To Assist You - Part II by Fr4nk(m): 3:02pm On May 22, 2022
Hi, thanks for opening this thread,
I have an infinix s4 device which seems to be stuck in a bootloop,
Its currently switched off, but whenever I try to turn it back on it just shows the infinix logo and goes off again, and it repeats the process of "show logo, switch off, turn on, show logo, switch off,turn on..." Till I force it to shutdown.
I've tried doing a hard reset but an error pops up whenever I try that,

Please what could be the problem and are there any tips for repairing it?
ProgrammingRe: Codewars.com Coding Challenges by Fr4nk(op): 7:25pm On May 20, 2022
Houstency:
Just started learning Python this week via HNI internship and a total newbie to programming. Kudos guys, I like what you guys are doing, should be able to join you guys as I progress lol. Tips, tricks etc to aid my learning would be highly welcomed.
Thank you and welcome to the club boss, we can't wait to see your codes
ProgrammingRe: Codewars.com Coding Challenges by Fr4nk(op): 7:23pm On May 20, 2022
It's the nested
for
loops for me grin
ProgrammingRe: Codewars.com Coding Challenges by Fr4nk(op): 7:21pm On May 20, 2022
My solution.py

def done_or_not(board): #board[i][j]
# check horizontals
#check if there are duplicates in the array
for i in board:
if len(set(i)) != 9:
return 'Try again!'

# check verticals
#check if there are duplicates in the array
for j in range(9):
if len(set(x[j] for x in board)) != 9:
return 'Try again!'

#check regions
#convert 3x3 region into a single one-dimensional array
#check if there are duplicates in the array
#yeah this was the really hard part for me LOL

c = 0
d = 3
for n in range(3):
a = 0
b = 3
for m in range(3):
region = []
for k in range(c,d):
for l in ([x[k] for x in board][a:b]):
region.append(l)

if len(set(region)) != 9:
return "Try again!"

a += 3
b += 3
c += 3
d += 3


return 'Finished!'


if __name__ == '__main__':
print(done_or_not([[1, 2, 3, 4, 5, 6, 7, 8, 9],
[2, 3, 4, 5, 6, 7, 8, 9, 1],
[3, 4, 5, 6, 7, 8, 9, 1, 2],
[4, 5, 6, 7, 8, 9, 1, 2, 3],
[5, 6, 7, 8, 9, 1, 2, 3, 4],
[6, 7, 8, 9, 1, 2, 3, 4, 5],
[7, 8, 9, 1, 2, 3, 4, 5, 6],
[8, 9, 1, 2, 3, 4, 5, 6, 7],
[9, 1, 2, 3, 4, 5, 6, 7, 8]]))
ProgrammingRe: Codewars.com Coding Challenges by Fr4nk(op): 7:16pm On May 20, 2022
Altairx440:
# My solution:

def validate(arr):
if sum(arr) != 45:
return False
return True

def paginate(arr):
return [arr[x:x+3] for x in range(0,9,3)]

def done_or_not(board):
for row in board:
if not validate(row):
return "Try again!"
for i in range(len(board[0])):
column = []
for j in range(len(board)):
column.append(board[j][i])
if not validate(column):
return "Try again!"

regions = [[]] * len(board)
for i in range(3):
tmp = paginate(board[i])
tmp += paginate(board[i+3])
tmp += paginate(board[i+6])
for k in range(len(board)):
regions[k] = regions[k] + tmp[k]
for region in regions:
if not validate(region):
return "Try again!"
return "Finished!"
It works. Great job.
But please try dey comment your code boss grin
It's the same approach as mine but with a different implementation, which is actually cool

1 2 3 (of 3 pages)