No video

How to Print first N Prime Number in Python | Easy code

  Рет қаралды 20,269

Geek Rishu

Geek Rishu

Күн бұрын

In this video i will show you how you can print the first N prime numbers
in a simple way
watch these .....
(Follow me on github for more source code)
You can also watch :
1) Python Script to print Next Prime Number
• Video
2) Python Script to print first N prime Numbers
• How to Print first N P...
3) How to take input in Python
• Video
4) Important terminology used in Python
• Video
5) For loop and While Loop in Python
• Video
and many more...
Please Subscribe our channel for more Programs, you can also comment your problem .

Пікірлер: 70
@aaryanale9538
@aaryanale9538 3 жыл бұрын
Thanks! You saved my assignment. 💖💖
@geekrishu172
@geekrishu172 3 жыл бұрын
You're welcome Please subscribe my channel for more programs and support me 😊😊
@aaryanale9538
@aaryanale9538 3 жыл бұрын
@@geekrishu172 it won't run... what can be the problem?? It's taking too much time to process the output... Tho m not getting output in the end.
@aaryanale9538
@aaryanale9538 3 жыл бұрын
@@geekrishu172 Thanks, but I'm not insta. Can you check my code at colab.research.google.com/drive/1ei7skVwcGwMJqMAuT2a-lRMdDS66FdPf?usp=sharing
@geekrishu172
@geekrishu172 3 жыл бұрын
The else block that you have used with if block is wrong Check my code again You have to use that else block with for loop
@aaryanale9538
@aaryanale9538 3 жыл бұрын
@@geekrishu172 Thanks, I corrected it. It's working now.
@BrendanMetcalfe
@BrendanMetcalfe 3 жыл бұрын
Just found your channel man - keep going!
@geekrishu172
@geekrishu172 3 жыл бұрын
Thankyou , please subscribe for more 😊
@anmol_seth_xx
@anmol_seth_xx 2 жыл бұрын
Bro in first for loop condition When i = 2, & c = 2 Then in range there will be (2,2) Then what will be the o/p when both the starting number and last number are same As I will begin from 2 but c will only take value upto 1
@rampratapsingh3894
@rampratapsingh3894 3 жыл бұрын
Thanks man it is really helpful. keep making videos like that bro .
@geekrishu172
@geekrishu172 3 жыл бұрын
Ur wlcm 😊
@thegraduatevlogger3211
@thegraduatevlogger3211 10 ай бұрын
Thank you so much brother
@BoostedPLAYER1
@BoostedPLAYER1 3 жыл бұрын
considering c= 2 you're running loop in range of(2,c) i.e., (2,2) that would give us empty list
@yuvrajshelar3074
@yuvrajshelar3074 3 жыл бұрын
same question bro
@preparedfor3957
@preparedfor3957 2 жыл бұрын
He is incrementing the value of c(c=c+1) thereafter
@0001-exe
@0001-exe 3 жыл бұрын
Thank you!!
@pratiklande1780
@pratiklande1780 3 жыл бұрын
Thank you sir And can you give example of list/set To create a list/set of first n prime number
@geekrishu172
@geekrishu172 3 жыл бұрын
All you need is to append all prime numbers to your list , Let say (l) , using append method I hope u will try 😊
@geekrishu172
@geekrishu172 3 жыл бұрын
Please subscribe 😊 for more such programs and share this with your friends and classmates
@geekrishu172
@geekrishu172 3 жыл бұрын
Watch this also , kzbin.info/www/bejne/gZe5d5ybmqmHkNU
@pratiklande1780
@pratiklande1780 3 жыл бұрын
@@geekrishu172 thank you sir using append I got answer in same program😊
@geekrishu172
@geekrishu172 3 жыл бұрын
Please support us by subscribing our channel for more programs 😊
@priyankak5579
@priyankak5579 3 жыл бұрын
Thankyou for your code. But how to store single digit numbers in single [] , double digits number in double [] from obtained output
@geekrishu172
@geekrishu172 3 жыл бұрын
Check the length of number by making it string , if length is 2 then append it in diff list and if length is 1 then append it in some diff list
@priyankak5579
@priyankak5579 3 жыл бұрын
@@geekrishu172 thankyou
@Lo13524
@Lo13524 3 жыл бұрын
Thx man you help me
@geekrishu172
@geekrishu172 3 жыл бұрын
Subscribe the channel for more videos please 😊
@Chessking1856
@Chessking1856 2 жыл бұрын
What is the difference between while and while true
@cinemaanthe7394
@cinemaanthe7394 Жыл бұрын
Thankyou broo
@SAXiDaGuiden
@SAXiDaGuiden Жыл бұрын
I understand what you did but in my mind it still makes no sense. For i in range(2, c) means range(2, 2), what??? Is this normal logic?
@englishhitsong3430
@englishhitsong3430 3 жыл бұрын
Thank U
@vaijanathbirajdar3163
@vaijanathbirajdar3163 3 жыл бұрын
very nice video bro... i want to know how to print only last number
@geekrishu172
@geekrishu172 3 жыл бұрын
Append all the numbers in a list but do not print that list(let say l), instead of doing that just write print(l[-1])
@raghavansruthi9205
@raghavansruthi9205 2 жыл бұрын
how to code for first prime number
@surajdhurve9689
@surajdhurve9689 3 жыл бұрын
Thanks bro
@geekrishu172
@geekrishu172 3 жыл бұрын
Please subscribe for more 😊
@gautamparmar2744
@gautamparmar2744 3 жыл бұрын
What logic apply user given is prime or non prime and later sum of separate prime and no prime.
@geekrishu172
@geekrishu172 3 жыл бұрын
Want a separate video on that or should i explain you ?
@gautamparmar2744
@gautamparmar2744 3 жыл бұрын
@@geekrishu172 thanks
@priyankak5579
@priyankak5579 3 жыл бұрын
hey can you help me with python program to copy csv file data to excel file?
@geekrishu172
@geekrishu172 3 жыл бұрын
Ya sure i ll help you in that
@geekrishu172
@geekrishu172 3 жыл бұрын
I will make a seperate video on that
@nicole-oe3vu
@nicole-oe3vu 3 жыл бұрын
what is your text editor?
@geekrishu172
@geekrishu172 3 жыл бұрын
Pycharm IDE
@serialupdates7244
@serialupdates7244 2 жыл бұрын
Sir plzz explain in c ++ program
@geekrishu172
@geekrishu172 2 жыл бұрын
Ok i will make a video on it 👍
@dhongadikunal7427
@dhongadikunal7427 3 жыл бұрын
bro i want to take classes from yoou
@geekrishu172
@geekrishu172 3 жыл бұрын
sure 😊
@nareshkanigiri4639
@nareshkanigiri4639 3 жыл бұрын
write a program to find first prime number in the given range of m and n python
@geekrishu172
@geekrishu172 3 жыл бұрын
Sure , please subscribe the channel so that you never miss an update 😊
@Lo13524
@Lo13524 3 жыл бұрын
What if we change it to even number ?? Input 5 output 2 4 6 8 10 Can you help me the code??
@geekrishu172
@geekrishu172 3 жыл бұрын
In that case you have to change your logic And for Input 5 Definitely your answer will be 2 4 6 8 10
@Lo13524
@Lo13524 3 жыл бұрын
@@geekrishu172 ok thx
@geekrishu172
@geekrishu172 3 жыл бұрын
I hope you understood If not i will make a separate video on this Don't worry 😊
@Lo13524
@Lo13524 3 жыл бұрын
@@geekrishu172 i got this donot worry thx man
@Lo13524
@Lo13524 3 жыл бұрын
@@geekrishu172 i want to ask what is the use of num -= 1 and c += 1. Why do if i donot include them it become infinite loop??
@kalingajagannath9755
@kalingajagannath9755 3 жыл бұрын
Its your keyboard or typewriter..lol😂
@geekrishu172
@geekrishu172 3 жыл бұрын
May be it sounds like a typewriter 😂
@kandulakalyanreddy5473
@kandulakalyanreddy5473 3 жыл бұрын
No clarity on screen. Do better bro
@geekrishu172
@geekrishu172 3 жыл бұрын
Well it was my first video , but i will try better from next time 😊
@geekrishu172
@geekrishu172 3 жыл бұрын
Please subscribe my channel for more programs 😊
@nareshagrawal3866
@nareshagrawal3866 4 жыл бұрын
Kabir Singh thank you
@geekrishu172
@geekrishu172 3 жыл бұрын
Welcome 😊
@yuvrajshelar3074
@yuvrajshelar3074 3 жыл бұрын
its wrong prgramm
@ShahzaibKhan-op3bu
@ShahzaibKhan-op3bu 2 жыл бұрын
How cam you proof yourself
Beautiful Soup 4 Tutorial #1 - Web Scraping With Python
17:01
Tech With Tim
Рет қаралды 470 М.
لااا! هذه البرتقالة مزعجة جدًا #قصير
00:15
One More Arabic
Рет қаралды 52 МЛН
WORLD'S SHORTEST WOMAN
00:58
Stokes Twins
Рет қаралды 207 МЛН
Bony Just Wants To Take A Shower #animation
00:10
GREEN MAX
Рет қаралды 7 МЛН
Python Tutorial - Prime Numbers | Printing Prime Numbers in Given Interval
18:33
Python - Print All Prime Numbers In Any Interval
6:00
Wrt Tech
Рет қаралды 44 М.
Compiled Python is FAST
12:57
Doug Mercer
Рет қаралды 107 М.
25 Nooby Pandas Coding Mistakes You Should NEVER make.
11:30
Rob Mulla
Рет қаралды 267 М.
5 JavaScript Concepts You HAVE TO KNOW
9:38
James Q Quick
Рет қаралды 1,4 МЛН
Python Decorators in 15 Minutes
15:14
Kite
Рет қаралды 438 М.
PRIME NUMBER PROGRAM IN PYTHON PROGRAMMING || PYTHON PROGRAMMING
7:45
Sundeep Saradhi Kanthety
Рет қаралды 79 М.
لااا! هذه البرتقالة مزعجة جدًا #قصير
00:15
One More Arabic
Рет қаралды 52 МЛН