
Prime Numbers, Times Tables, & More - Python Basics with Sam
video description
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
Related videos
Comments and reviews: 3
Rolling
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
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
Jarji
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
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
Dirty
Does programming depend on your hardware, because i only have low end laptop with 4GB ram, can i do program with my laptop??
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















