- Видео 62
- Просмотров 90 650
Friendly Neighborhood Coder
Индия
Добавлен 26 авг 2009
I have come here to chew bubble gum and write code.... and I'm all out of bubble gum.
STOP Learning Python from Courses - Here's Why
Are you putting off on learning to write code in python? You're not alone. In fact, I frequently get comments from people I know that they want to learn python programming - yet, they never start!
If you're looking to come out of that rut, checkout my video, where I give you actionable steps to learn ANY programming language. That's right!
In fact, I'm so sure of these methods that if these methods don't work for you, I'll personally guide you. You can send me a DM on Instagram - @fncoder
Other popular videos from this channel:
2 Beginner Python projects: ruclips.net/video/cd4bApAhEIM/видео.html
Stop Using ELSE conditions: ruclips.net/video/gKaGpNnR07c/видео.html
7 Python Project Ideas: ruclip...
If you're looking to come out of that rut, checkout my video, where I give you actionable steps to learn ANY programming language. That's right!
In fact, I'm so sure of these methods that if these methods don't work for you, I'll personally guide you. You can send me a DM on Instagram - @fncoder
Other popular videos from this channel:
2 Beginner Python projects: ruclips.net/video/cd4bApAhEIM/видео.html
Stop Using ELSE conditions: ruclips.net/video/gKaGpNnR07c/видео.html
7 Python Project Ideas: ruclip...
Просмотров: 403
Видео
Python game with Mediapipe Hands Library - Rock paper Scissors!
Просмотров 1,1 тыс.2 года назад
Python mediapipe library's hands module can be used in many ways. I used it to build a game of Rock paper Scissors. This is a fun intermediate python project, and very easy to implement. This program uses object detection or image detection provided by the Mediapipe hands library module so that the player can play against the computer over a webcam. Mediapipe is the library generally used for i...
Build your FIRST Python Flask project
Просмотров 2352 года назад
Python Flask is a web framework in the famous Python language that lets you develop web applications easily. In this video I'll be explaining the code implementation of my sample application from my previous video. If you have no idea about web applications, watch the prequel video: ruclips.net/video/IxMR_SD7cMY/видео.html GitHub link to the complete source code: github.com/ramdas-codes/fncoder...
A Beginner's Guide to Web Development with Python Flask
Просмотров 942 года назад
In this video I'm explaining how web applications work in general. I'll also demo a sample application of a voting system developed using python flask. Python Flask is a web framework in the famous Python language that lets you develop web applications easily. Watch the code explanation here: ruclips.net/video/9GjwxKTygmc/видео.html Popular videos from this channel: 2 Beginner Python projects: ...
Python lists - Full Tutorial in 12 minutes | Python list properties | python list methods | usages
Просмотров 1 тыс.3 года назад
Python lists full tutorial. One of the key things to understand when you're learning a new programming language is how to handle a collection of items. In real life applications, you're always needed to write programs that handle lists of items. You can see lists everywhere. In this video, we're going to look at how Python handles lists. Python has 4 in-built data types for handling collections...
Hangman game | Python project tutorial part (2/2) | beginners and intermediate Python projects
Просмотров 2283 года назад
In this video, we're going to one of the 7 different python beginner and intermediate projects that I promised to do in one of my previous videos - Python project ideas - beginners and intermediate python projects. These projects ideas are meant for beginners as well as intermediates. Some of these projects will be difficult for a beginner to implement. I will be making tutorial videos for each...
Hangman game | Python project tutorial part (1/2) | beginners and intermediate Python projects
Просмотров 3783 года назад
In this video, we're going to one of the 7 different python beginner and intermediate projects that I promised to do in one of my previous videos - Python project ideas - beginners and intermediate python projects. These projects ideas are meant for beginners as well as intermediates. Some of these projects will be difficult for a beginner to implement. I will be making tutorial videos for each...
Python web scraping tutorial - Intermediate Python projects
Просмотров 7213 года назад
Welcome to Python web scraping tutorial. Web scraping is a powerful concept with endless opportunities. Web scraping is the process of using bots to extract content and data from a website. How to use the extracted content is up to you. Web scraping is used for contact scraping, and as a component of applications used for web indexing, web mining and data mining, online price change monitoring ...
Python practice coding problems for beginners - Part #3 - 3 problems
Просмотров 1853 года назад
Python practice coding problems for beginners - Problem set #1 - 3 problems In this video, I'm working through the python practice coding problems for beginners from w3resources below: www.w3resource.com/python-exercises/python-basic-exercises.php This is the second part of Python basic (Part -I) [150 exercises]. In this video, I'll walk through 3 problems. I hope you found this helpful and let...
What are Python Docstrings? - Problem set walk-through - #2
Просмотров 803 года назад
Python practice coding problems for beginners - Problem set #1 - 3 problems In this video, I'm working through the python practice coding problems for beginners from w3resources below: www.w3resource.com/python-exercises/python-basic-exercises.php This is the second part of Python basic (Part -I) [150 exercises]. In this video, I'll walk through 3 problems. I hope you found this helpful and let...
Python practice coding problems for beginners - Problem set #1 - Part-1 - 10 problems
Просмотров 3133 года назад
Python practice coding problems for beginners - Problem set #1 - 10 problems In this video, I'm working through the python practice coding problems for beginners from w3resources below: www.w3resource.com/python-exercises/python-basic-exercises.php This is the first part of Python basic (Part -I) [150 exercises]. This video contains 10 problems and my approach towards solving. I hope you found ...
Python project ideas - beginners and intermediate Python projects
Просмотров 8 тыс.3 года назад
In this video, we're going to look at 7 different python projects. These projects ideas are meant for beginners as well as intermediates. Some of these projects will be difficult for a beginner to implement. I will be making tutorial videos for each of these 7 videos. If you need any help with your doubts, follow me on Instagram and send me a message and I'll be trying my best to help. My Insta...
2 Python Beginner Projects Tutorial in 15 minutes - Digital clock & Analog clock
Просмотров 39 тыс.3 года назад
2 Python Beginner Projects Tutorial in 15 minutes - Digital clock & Analog clock
Leetcode 1680. Concatenation of Consecutive Binary Numbers - Weekly Contest 218
Просмотров 2443 года назад
Leetcode 1680. Concatenation of Consecutive Binary Numbers - Weekly Contest 218
Leetcode 605. Can Place Flowers - December Leetcoding challenge - Day 5
Просмотров 1113 года назад
Leetcode 605. Can Place Flowers - December Leetcoding challenge - Day 5
Leetcode 1492. The kth Factor of n - December Leetcoding challenge - Day 4
Просмотров 1053 года назад
Leetcode 1492. The kth Factor of n - December Leetcoding challenge - Day 4
Programming as a mind sport - Competitive Programming
Просмотров 1463 года назад
Programming as a mind sport - Competitive Programming
3 THINGS you need to LEARN for solving topological sorting problems
Просмотров 563 года назад
3 THINGS you need to LEARN for solving topological sorting problems
Implementing LRU Cache - Common Interview problem - Leetcode
Просмотров 1433 года назад
Implementing LRU Cache - Common Interview problem - Leetcode
Stop using ELSE statements - Try this instead
Просмотров 18 тыс.4 года назад
Stop using ELSE statements - Try this instead
Leetcode 1189.Maximum Number of Balloons.
Просмотров 4314 года назад
Leetcode 1189.Maximum Number of Balloons.
Why add comments if the conditions are already clear and descriptive? Informative video btw.
You need to be more thorough. You mentioned that there are cases where Guard Clauses wouldn't work well, but never transitioned into the reasons why. Otherwise, the content is good.
make low freq possibilty first to avoid branch, it makes ur code almost branchless but for if else code, else code also need jmp instruction which is random memory cache miss
4:55 next to the hashmap shouldn't it be: target - first N (6-3), target - second N (6-2)etc?
Interesting, but doesn’t allow for factored logic (which is acknowledged in the video). You could do the same thing. In a try-except, raising a benign exception to hop out of a stack of non-nested if statements.
Massivly underrated channel. Keep up the good work👍
Thanks bro, the project done.
can we work with vscode instead pycharm
this is the best ever solution given
Great video. I made it, and then, I have expanded the digital clock to show also the date, using instead the datetime module. Now we have to pack and update 3 text labels. I do it in only one function "update_clock". Here the code: import tkinter as ui from datetime import datetime as dt w = ui.Tk() def update_clock(): now = dt.now() dayName = now.strftime("%a") dayNum = now.strftime("%d") monthName = now.strftime("%b") monthNum = now.strftime("%m") year = now.strftime("%Y") hour = now.strftime("%H") minute = now.strftime("%M") second = now.strftime("%S") date_name_text = dayName + ", " + monthName + " " + dayNum date_number_text = dayNum + " / " + monthNum + " / " + year time_text = hour + ":" + minute + ":" + second dc_DateNameLbl.config(text=date_name_text) dc_DateNumberLbl.config(text=date_number_text) dc_TimeLbl.config(text=time_text) dc_TimeLbl.after(1000, update_clock) dc_TimeLbl = ui.Label(w, text="00:00:00", font="Helvetica 32 normal") dc_TimeLbl.pack() dc_DateNameLbl = ui.Label(w, text="Sunday, Jan 01", font="Helvetica 20 normal") dc_DateNameLbl.pack() dc_DateNumberLbl = ui.Label(w, text="00/00/0000", font="Helvetica 20 normal") dc_DateNumberLbl.pack() update_clock() w.mainloop()
Video could have been 90 secs
Hello Bro thank you for video. All them work exlantly
Great to hear. Glad this helped. :)
No I like using else
Alright! I'll allow it
This is kinda dumb
thanks it helped a lot ❤
Thank you. I'm glad this helped. :)
Please what is that beautiful font I see?
Sorry about the delayed response. Do you mean the font on the thumbnail of this video?
@@fncoder Sorry if you misunderstood, I meant the font used in the code😅
Ten thousand.. not hundred thousand lol
Yeah, started off with 100,000 and then I thought 'nah, 10,000 is enough'
Thank you
:)
Completely agree with you.
Bro how to save it and how to create a analog
To save a python file in Pycharm, goto File -> Save. If you watch the whole video, it explains both digital and analog clocks. :)
@@fncoder bro you have created a analog from photoshop and I don't know how to make it in Photoshop
@@krishchauhan2038 please use mine. I have provided the image in the GitHub project. If you still need help, please feel free to message me @fncoder on Instagram
@@fncoder bro I have a image in my desktop now how can attach it as dial.400 like u did . How can attach it in python file
Nice I can understand all the Things
Thanks. I'm glad this helped :)
冗長だし新しくもない
What does this mean? :)
In practice I don't find the need to use else statements in most cases. A lot of if statements are meant to exit the code early. I tend to keep nesting to a minimum because it makes code more readable. I also find out in a recent project I could remove some guard clauses that would throw in the beginning of a method by putting the error checking code inside the input object. It was an immutable object and error checking occured in the constructor. That made it very clean.
Guard clauses are one of those things - once you know, you know - it becomes really hard to use else statements. That constructor level check you mentioned sounds cool, man! Do you have a sample code for something like that?
@@fncoder Sure, I built a web crawler in Java for an interview project and was using the URI class from the standard library for representing pages to be crawled. But there was a lot of code using it so I created a dedicated domain class for it, and it only accepted the right types of URLs. This meant that I didn't have to repeat validation for all the necessary conditions in multiple places. import java.net.URI; import java.net.URISyntaxException; import java.util.Objects; public class Page { private final URI uri; public Page(URI url) { this.uri = getValidatedURI(url); } public Page(String url) { this.uri = getValidatedURI(url); } private URI getValidatedURI(String url) { try { return getValidatedURI(new URI(url)); } catch (URISyntaxException e) { throw new IllegalArgumentException("URL " + url + " fails to satisfy RFC 2396", e); } } private URI getValidatedURI(URI url) { if (!url.isAbsolute()) throw new IllegalArgumentException("URL " + url + " is not absolute"); if (!url.getScheme().equalsIgnoreCase("http") && !url.getScheme().equalsIgnoreCase("https")) throw new IllegalArgumentException("URL " + url + " does not have a HTTP/HTTPS scheme"); try { return new URI(url.getScheme(), url.getHost(), url.getPath(), null); } catch (URISyntaxException e) { throw new IllegalArgumentException("Failure to remove fragment from URL " + url); } } public URI uri() { return uri; } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; Page page = (Page) o; return uri.equals(page.uri); } @Override public int hashCode() { return Objects.hash(uri); } @Override public String toString() { return uri.toString(); }
@@lucasdarianschwendlervieir3714 Thanks man! 👍
I did...it Thanks ...❤🔥
Great to hear. I'm glad this helped :)
I think watching tutorial at first and doing some projects along with the tutorials is completely fine. But you need to build projects on your own after finishing the course. This is how you should convey the message.
I believe you and I are saying the same thing - except that I believe in the power of short tutorials instead of full blown courses. In an ideal world, doing a full python course first WOULD make sense before starting a python project. But most people just finish tutorials for clout. They just want to say "yeah, I finished this 10 hour course" and then they don't take ANY action. After a while, they forget everything. Instead if they start from a project, it gives them a purpose bigger than "just" learning for the sake of learning.
if you want to grow your channel, post some other programming content. I myself learned programming from a 12 hour video on RUclips and also did exercises on google. This is THE method to learn. Now I'm a good basic programmer.
Sure. 12 hour video tutorials may look effective in the short term, but after a while you lose what you learn. To tackle that, you need to do projects. To me, the only way to learn something is through practice, which is basically what I wanted to share in this video.
As promised in the video, if you try these steps and they don't work for you, you can DM me on Instagram - @fncoder :) And I'll help you. So, what project are you trying to build now?
I'll give this a thumbs up even before watching it. I've been using guard clauses for nearly 20+ years, and they really clean up conditional logic. They're particularly useful when used as precondition checks, so by the time you get to the core of some logic, you know the exact state of the data. Guard clauses => easier to read, easier to test, more bulletproof code!
Absolutely! (Y)
I make digital clock ITS WORKED WELL THANK YOU
Thank you. I'm so glad to hear that :)
its worked super bro
Very nice and usefull. May i use it for educational purposes in my school?
Thank you. I'm glad to hear this helps. Please feel free to use it for your school :)
This is dope!
Thank you. :)
Pretty cool.. congratulations
Thank you :)
Pls upload Python from basic to advance as course with multi videos so tha t we can see that easy
Sure. At some point, I'll release something like that.
Thanks for your great tutorial.
Thank you. I'm glad you liked it. :)
thanks that awesome video, but why the code isn't working canvas.pack(expand=True, fill='both')
Hi there, apologies for the delayed response. What's the error you're getting? The line you mentioned is the pack() function of Tkinter which organizes the elements before placing them onto parent widget. So it's important that this is called.
@@fncoder hi there would you please a video on how to convert that python file we just made to an .exe or .apk file extention thank you
Total stupidity... No way you can avoid using else. To avoid the if statements hell you need to use decision tables approach.
That's a wrong statement. You can avoid else statements in most cases, like in the example mentioned in this video.
I advise you try to do some research before calling something stupid mate, don't be a victim of the Donning Kruger effect
I’ve been programming for over 35 years and hardly ever write an else statement.
thank you for this video I'm learning JS and this is very helpful
Thank you. I'm glad to know this helped :)
how do you get the image in pythan
I created the image in Photoshop and loaded it using code.
Of course the code to load the image is at 07:20 of this video
Thank you for your valuable information and it is gonna be my first project. Feeling bless.
Thank you. That's awesome! I'm glad to hear that.
I followed this step by step and the hands are not moving for me???
Hi Ryan, Please send me the code and I'll help you with that.
@@fncoder Thank you so much! I sent an email, but it's also here: import tkinter as ui import time import math window = ui.Tk() window.geometry("700x700") def update_clock(): hours = int(time.strftime("%I")) minutes = int(time.strftime("%M")) seconds = int(time.strftime("%S")) seconds_x = seconds_hand_len * math.sin(math.radians(seconds * 6)) + center_x seconds_y = seconds_hand_len * math.cos(math.radians(seconds * 6)) + center_y canvas.coords(seconds_hand, center_x, center_y, seconds_x, seconds_y) window.after(10, update_clock) canvas = ui.Canvas(window, width=700, height=700, bg='white') canvas.pack(expand=True, fill='both') bg = ui.PhotoImage(file='wheel.png') canvas.create_image(350, 350, image=bg) center_x = 350 center_y = 350 seconds_hand_len = 100 minutes_hand_len = 85 hours_hand_len = 70 seconds_hand = canvas.create_line(350, 350, 350 + seconds_hand_len, 350 + seconds_hand_len, width=5, fill='red') minutes_hand = canvas.create_line(350, 350, 350 + minutes_hand_len, 350 + minutes_hand_len, width=5, fill='blue') hours_hand = canvas.create_line(350, 350, 350 + hours_hand_len, 350 + hours_hand_len, width=5, fill='yellow') update_clock window.mainloop()
@@fncoder I will say your github link works perfectly, so I'm just wonering where I went wrong
@@ryanmichelson218 I have responded to the mail as well. Please try it out and let me know how it goes. :)
@@fncoder you’re amazing
Thank
:)
so, guard clauses mean writing a bunch of if condition without nesting it, right?
Hi Asifur, that's correct. Rephrasing your logic such that the if conditions themselves return without the need of any else statements.
explained well better than others
Thank you. I'm glad you've found this helpful :)
plz give the analog image link bro
Hi Sarthak, I've provided the GitHub link in the description where you can find the code as well as the png file.
Nice one 👍
Thank you :)
my needle is moving anti-clock wise what can be the fault ?
My GitHub link is there in the description so you can compare. But it's possible you didn't multiply by -1 when calculating y position
I loved the explanation
Thank you :)
Great , i revised all concepts in 10 min
Thank you. I'm glad you found this helpful :)
In a clock how we get microsecond counting
Hi Shahul. , The same logic used in this can be used to get milliseconds or microseconds. Seconds/1000000 would be micro seconds, and you could factor that into the destination x and y parameters in case you want to show that on screen.