Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / NewStats: 3,154,092 members, 7,821,777 topics. Date: Wednesday, 08 May 2024 at 06:18 PM |
Nairaland Forum / Naijasensei's Profile / Naijasensei's Posts
(1) (2) (3) (4) (5) (6) (7) (8) (9) (10) (of 19 pages)
Programming / Re: Learning Programming. (my Nairaland Journal) by naijasensei: 12:38pm On Nov 09, 2020 |
Karleb: Really? Are you sure of what you just typed? Here is proof that it works. I don't want to provide all the answers so that our friend can work, learn, and understand. 2 Likes
|
Programming / Re: Please Help A Newbie by naijasensei: 12:14pm On Nov 09, 2020 |
Pearlbaby: If you intend to go far in web development you will need Javascript. Javascript is an important member of the trifecta of web development. - HTML is for structure - CSS is for styling - Javascript is for behavior |
Programming / Re: Learning Programming. (my Nairaland Journal) by naijasensei: 11:55am On Nov 09, 2020 |
syluck: For question 1, you are simply printing the same value four (4) times. The characters (*) can be stored in a string, after which you can the print. E.g. my_string = '*******************' Print my_string the required number of times. For question 2, you are printing two (2) different patterns, which can be stored in two (2) different strings. Example pattern1 = '*******************' pattern2 = '* *' You should know what to do from here. Question 3 is slightly different. There is a clear pattern here, each new line has a new character added at the end of the string. You can simply use string concatenation (+). Example custom_string = '*' print(custom_string) custom_string = custom_string + '*' # or custom_string += '*' print(custom_string) ....you know the rest. Thanks. |
Programming / Re: Learning Programming. (my Nairaland Journal) by naijasensei: 11:38am On Nov 09, 2020 |
syluck: Hi there, my good friend. Glad to see you are making progress. For question number 4, I think you misread the question. 1. You see that dot between 47 and 48? It is actually a multiplication operator, not a decimal point. It is placed at a height that is mid height of the two numbers, rather than being placed on the baseline e.g. 47*48 not 47.48 I will apportion some blame to the authors though. 2. We can prove this by manually performing the calculation: (512 - 282) / (47*48 + 5) = 230/(2256 + 5) = 230/2261 = 0.101724900 = 0.1017 (to 4 decimal places) Let me just drop a piece of advice which will help you going forward. When you have a problem you are trying to use an algorithm to solve; understand the problem perfectly, solve it manually to confirm that you know the expected solution. In programing, when programs are tested - you provide known inputs, then you check that the program produces the expected output. 3. You don't need a function or integer division to solve this problem. 4. I also noticed you had some issues with parentheses. In Mathematics there is BODMAS (Brackets Of Division Multiplication Addition and Subtraction) to determine precedence of operations, but in programing we have PEDMAS (Parentheses Exponentiation Division Multiplication Addition Subtraction). To force a certain precedence use parentheses. //Sample program result = (512 - 282) / ((47 * 48) + 5) print(f"The result of the calculation is: {result}" ) Don't give up, you are on the right track. 8 Likes |
Phones / Re: The Xiaomi Thread. by naijasensei: 8:30am On Nov 08, 2020 |
ityP: Damn, that's bad. |
Phones / Re: The Xiaomi Thread. by naijasensei: 12:13pm On Nov 07, 2020 |
ityP: My fellow former Lenovo K5 pro owner, what happened to your K5 pro? |
Programming / Re: Why Do You Love Flutter by naijasensei: 11:48am On Nov 07, 2020 |
LilSfc: Yes you can. 1 Like |
Programming / Re: Why Do You Love Flutter by naijasensei: 7:18pm On Nov 01, 2020 |
talk2hb1: PWAs have access to some, not all. |
Programming / Re: Why Do You Love Flutter by naijasensei: 10:16am On Oct 31, 2020 |
Karleb: You are right, I forgot about that nonsense Oracle did recently. |
Politics / Re: Amos Iyari Monye: I Beg To Feed Despite Working Under Buhari, Obasanjo, Gowon by naijasensei: 10:13am On Oct 31, 2020 |
jcmaiah: You sir, are very wise. This is one of the most insightful things I have read on this site. Another reason Nigeria will probably never be great is because Nigeria is built on a foundation of innocent blood, the blood of the slain cry out to God daily for vengeance. 2 Likes |
Programming / Re: Why Is It That The Things That Give Money In Tech Are Always Hidden? by naijasensei: 10:03am On Oct 31, 2020 |
talk2hb1: I think PHP is the bogeyman, the man that refused to die. Just like Benjamin Button, PHP keeps getting fresher and better with each release. I am sure when some Node developers sleep they always have PHP based nightmares . PHP is not going anywhere anytime soon. 1 Like |
Programming / Re: Why Do You Love Flutter by naijasensei: 9:56am On Oct 31, 2020 |
Karleb: I disagree with your assertion that Flutter adopters are suffering from shiny object syndrome. Progress shouldn't be abandoned because there is a solution already. Consider Kotlin, it was developed to address some of the shortcomings in Java (like the infamous NullPointerException), it is a nice drop in replacement for Java - which many developers are thankful for. Now when it comes to Flutter, what can we say about the alternatives. 1. Xamarin - cool solution, but has driven many a developer to the brink of madness, because of the way it forces you to do certain things - the .NET way. 2. React Native and NativeScript - excellent options, but some people aren't comfortable with JavaScript. Also things can get complicated in certain scenarios. Flutter also has its own issues, also there is that latent fear that Google can stop developing it. As the popular saying goes "...different strokes for different folks...", use whatever (proper tool) you are most comfortable with. 1 Like |
Programming / Re: Why Do You Love Flutter by naijasensei: 9:38am On Oct 31, 2020 |
NobleEugene5: Warning, long answer ahead. To know why people use Flutter, let's get the big picture. There are presently four ways to create mobile apps - Android and iOS apps. 1. Progressive Web App: this is simply a responsive web app developed with HTML/CSS/JavaScript. There is no need for installation, but they don't have access to the phone's native features (APIs - Bluetooth, vibration, battery, gestures, etc). 2. Hybrid apps: Cordova, Ionic, and Phonegap fall into this category. These solutions also use HTML/CSS/JavaScript. They use a native wrapper to envelope your code, thereby providing access to native APIs, but they are not as fast or optimised as true native apps. 3. Native apps: with these you create apps with the native toolset (SDKs) and languages meant for such platforms. These apps have access to the entire mobile API (Android or iOS), are fast, and are highly optimised for their platforms. For Android native we have Java/Kotlin (Programming language) with Android Studio (IDE), while iOS uses Swift (Programming language) with XCode (IDE). 4. Cross platform native apps: here we have React Native (uses a form of Javascript - JSX, from Facebook), Flutter (uses Dart, from Google), Nativescript (uses Angular, Vue.js, TypeScript, or JavaScript) , and Xamarin (uses C#, from Microsoft). These solutions produce native apps with full access to the underlying APIs. They enable you to write your app once and simply use the same codebase for other platforms, saving you time and money. You don't need to hire Java/Kotlin and Swift developers to create separate apps. As to why Flutter is popular - it is newer than the other cross platform options, most of the frustrations and short comings encountered in other solutions have been ironed out in Flutter. Also Flutter (and Dart) is very easy to develop in. Part of the popularity of React Native and NativeScript stems from the fact that JavaScript developers have a very low barrier of entry. Is Flutter better than React Native, NativeScript, and Xamarin? That is subjective, it depends. But when it comes to PWAs and hybrid apps - I will choose Flutter over those two every single time. I hope I have not bored you, thanks. 9 Likes |
Programming / Re: How Can I Monetize My Programming Skills by naijasensei: 2:09pm On Oct 30, 2020 |
olatuneji: You have to dig to find the good stuff. Try searching for the following books - "PHP The Right Way", Learning" PHP 7", and "Learn PHP 7". Remember, nothing good comes easy. 4 Likes 1 Share |
Programming / Re: Why Is It That The Things That Give Money In Tech Are Always Hidden? by naijasensei: 1:45pm On Oct 30, 2020 |
tensazangetsu20: I actually align with @plat0 here. The main thing I always remember is - solve people's problems, while using the best tools available at your disposal. Businesses do not care about your tech stack, they care about results. For example, PHP was built for the web - so it excels there. I would be crazy trying to create a CLI app, or worse yet a desktop GUI app with PHP - it is possible, but not worth it. If I want to dabble into data science - Python would be my go to. Every tech stack has its own niche where it will excel. 3 Likes |
Programming / Re: Why Is It That The Things That Give Money In Tech Are Always Hidden? by naijasensei: 1:20pm On Oct 30, 2020 |
MrJavaS: PHP outdated? Don't make me laugh. You are probably referring to old versions of PHP (3, 4, and 5). PHP7 is lit, PHP8 will also be dropping this year. If you tell me PHP was crap before - no problem, if you tell me PHP made it easy to write unsafe code before - I would agree with you, but calling PHP outdated - no way, that is a declaration of war. |
Programming / Re: Learning Programming. (my Nairaland Journal) by naijasensei: 12:05pm On Oct 29, 2020 |
syluck: From your screenshot, there are indentation errors on the last two lines of your program. The 'else' should be on the same level of indentation as the previous 'elif'. You can even notice the 'else' is underlined with a red squiggly line to point out the error. 1 Like |
Programming / Re: Learning Programming. (my Nairaland Journal) by naijasensei: 12:00pm On Oct 29, 2020 |
syluck: Hi, sorry for the late reply. I got banned by the anti spam bot for posting my earlier reply. Remember, you are on a computer. All the values that are used in a program are stored in the computer's memory. This is a general concept, and it is not specific or exclusive to the Python programming language. When you create a program, all the values you use in your program are stored in memory, but to make it easy to reference or call such values you label them - with a variable. You can then get these values by using variables - which point to where the actual value is stored. What I am explaining is a form of abstraction, it is a way of hiding complex things using simple concepts. Without this type of abstraction you will have to know about memory, memory locations, and memory addressing when writing your programs. The reason I pointed this out is because it will help you later in your programming journey, better to understand it now than later. 3 Likes |
Programming / Re: Learning Programming. (my Nairaland Journal) by naijasensei: 11:20am On Oct 28, 2020 |
syluck: Hi, glad to see you are getting good mileage on your journey. Not trying to come across as snobbish, but I just want to correct an impression you have. Variables are not containers, a variable is more like a label that points to a value. Values (integers, floats, boolean, strings) are stored in memory, so a variable points to a memory location. Don't just take my word for it, here is proof. There is a function in Python called identity - id(). id() is used to return the memory location of a particular value. Exercise Create two or more different variables, then assign the same value to each variable. my_var = 34 another_var = 34 third_one = 34 print(id(my_var)) print(id(another_var)) print(id(third_one)) The value returned should be the same for the three print functions. The actual value will also depend on the particular system you run the code on. Hope I have not confused you though, because this concept is very important. 10 Likes |
Gaming / Re: I Want To Buy A PS VITA by naijasensei: 1:25pm On Oct 26, 2020 |
pcguru1: Mine was stolen, at gun point. I played a lot of games on that laptop, I still have fond memories of that laptop. |
Gaming / Re: I Want To Buy A PS VITA by naijasensei: 1:21pm On Oct 26, 2020 |
pcguru1: Yes, if I remember correctly it was a Radeon HD7870M GPU, that thing was a beast then. |
Phones / Re: Dual Core, Quad Core, Octa Core. What Do They Mean? by naijasensei: 1:11pm On Oct 26, 2020 |
TheAk: Snapdragon is a brand of SoCs developed by Qualcomm. Others are the Helio and the Dimensity series from Mediatek, Kirin from Hisilicon (Huawei), Exynos from Samsung, and the Bionic series from Apple. Each manufacturer has different classes of SoCs (except Apple who only produce flagship SoCs) - entry level, budget, midrange, and flagship. 1 Like |
Gaming / Re: I Want To Buy A PS VITA by naijasensei: 1:02pm On Oct 26, 2020 |
AIlahuAkbar:You can, but you will hate the experience. To put it in perspective, I currently have a laptop with a 2nd generation Core i5 CPU, 6GB of RAM, and Intel HD3000 graphics - my laptop struggles terribly with PS2 emulation, it is not powerful enough. Funny enough, I once had a laptop with a 4th generation Core i5 CPU, 4GB of RAM, and an AMD Radeon 7870 GPU that emulated PS2 games with ease. |
Gaming / Re: I Want To Buy A PS VITA by naijasensei: 12:12pm On Oct 26, 2020 |
AIlahuAkbar: Yes, it is clearer. Unfortunately, that laptop is seriously underpowered. - 2GB RAM is not good enough for any type of high end gaming or emulation. - Core 2 Duo is an outdated CPU. - Your GPU is also outdated. You will be needing another laptop for high end gaming and PS2 emulation. |
Gaming / Re: I Want To Buy A PS VITA by naijasensei: 11:32am On Oct 26, 2020 |
AIlahuAkbar: It seems your system has a Core 2 Duo CPU, which is ancient by today's standards. If indeed it has a Core 2 Duo CPU, heavy gaming and even PS2 emulation will be difficult. |
Gaming / Re: I Want To Buy A PS VITA by naijasensei: 11:28am On Oct 26, 2020 |
AIlahuAkbar: Hi, can you capture a clearer screenshoot of the System details. Use Alt + Print Screen to capture the page, then post the image in paint, save it as a jpeg, then upload it here. The one here is not clear enough. |
Programming / Re: A Thread For Tutorial On Python Programming by naijasensei: 1:21pm On Oct 18, 2020 |
seunny4lif: Hi. Division is repeated subtraction, so if you repeatedly subtract two (2) from a number until you get either one (1) or zero (0) - you will get what you are looking for. Example 1: Seven (7) 7 - 2 = 5, 5 - 2 = 3, 3 - 2 = 1 Since we got one and not zero, it means 7 is odd. Example 2: Ten (10) 10 - 2 = 8, 8 - 2 = 6, 6 - 2 = 4, 4 - 2 = 2, 2 - 2 = 0 Since we got zero and not one, ten is even. 1 Like |
Technology Market / Re: Omotolsy Claim Of Integrity Is Not True. He Is Not Save To Buy Item From by naijasensei: 8:00pm On Oct 06, 2020 |
ACRI: Oh, wow. Can you see how you just contradicted yourself? You are accusing the seller of having "a fit of pride", and then you go on to type " business is not for everyone, especially people with big ego", and finally to top it off claim you are making "a neutral observation". Since your are proud of what you typed, my prayer for you is this - in your time of need, may you be judged exactly the way you have judged the seller. 4 Likes |
Technology Market / Re: Omotolsy Claim Of Integrity Is Not True. He Is Not Save To Buy Item From by naijasensei: 11:19am On Oct 06, 2020 |
nymphomaniac: Excellent, this is the way to go. Anyone who makes unfounded claims should always be ready for repercussions - online and offline. 1 Like |
Technology Market / Re: Omotolsy Claim Of Integrity Is Not True. He Is Not Save To Buy Item From by naijasensei: 3:50pm On Oct 04, 2020 |
omotolsy: Hi. I want to commend you for your maturity in handling this badly scripted smear campaign. I just want to say something which might sound a little bit controversial. Whenever a prospective customer starts begging excessively, lamenting they don't have enough money, asking very annoying questions, or asking you to make weird concessions - avoid them, or make them sign an agreement. From my investigations, some of the most vicious and ungrateful customers are usually those you made some personal concessions for. 13 Likes 5 Shares |
(1) (2) (3) (4) (5) (6) (7) (8) (9) (10) (of 19 pages)
(Go Up)
Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health religion celebs tv-movies music-radio literature webmasters programming techmarket Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 87 |