VehiclesFashionRecipesBlogsHuntTravelsSportFunHandmadeITEducation
Mini-Games
x

x
zakruti.com » IT - Software » freeCodeCamp.org
Prime Numbers, Times Tables, & More - Python Basics with Sam

Prime Numbers, Times Tables, & More - Python Basics with Sam

FBTwitterReddit

video description

Rating: 4.0; Vote: 1
Prime Numbers, Times Tables, & More - Python Basics with Sam Sasha: Around 51:23 you talk about the code to find the tenth prime number and you get 29, however i have double and triple checked and compared your code and what I wrote and they look the same to me but I keep on getting 19 instead of 29. Any idea whats going on?
heres the code that i wrote for this exercise:
def isPrime(num):-
for i in range(2, num):-
if num %i == 0:-
return False-
return True
def nthPrime(x):-
num = 3-
prime = 2-
if x == 1:-
return 2-
while prime < x:-
num += 2-
if isPrime(num):-
prime += 1-
return num

Date: 2022-03-14

Comments and reviews: 3


he is a great tutor, but I want to ask from everybody, I still don't understand python (or any language), what should I do ? I have tried many basic concepts videos but I fail to understand programming and it is must for me to learn programming, any suggestions pls ??
reply

Hello Sam, still watching your live streams in 2021, I've learned a lot, this is super cool when someone is sharing its knowledge dynamically-live ! would be nice if you continue streamming from time to time. Regards from Georgia.
reply

Does programming depend on your hardware, because i only have low end laptop with 4GB ram, can i do program with my laptop??
reply
Add a review, comment






Other channel videos