Skip to content Skip to sidebar Skip to footer
Showing posts with the label Primes

First 100 Prime Numbers

I know there are a number of ways to find the first 100 prime numbers but please help me in my appr… Read more First 100 Prime Numbers

Infinite Range In My Python Prime Finder?

I am trying to get an infinite range in my python prime number finder! here is my code! import math… Read more Infinite Range In My Python Prime Finder?

Improve Code To Find Prime Numbers

I wrote this python code about 3 days ago, and I am stuck here, I think it could be better, but I d… Read more Improve Code To Find Prime Numbers

Number Of Primes Less Than Or Equal To X

Ï€(x) = Number of primes ≤ x Below code gives number of primes less than or equal to N It works perf… Read more Number Of Primes Less Than Or Equal To X

Working With Large Primes In Python

What is an efficient way for working with large prime numbers with Python? You search on here or on… Read more Working With Large Primes In Python

Find Mersenne Prime Numbers Using List Comprehensions And My Code

I wrote this code to find prime numbers, but how could I change it to find Mersenne prime numbers? … Read more Find Mersenne Prime Numbers Using List Comprehensions And My Code

How Come In This Code To Find Prime Numbers, Is_prime(9) Returns True?

def is_prime(x): if x Solution 1: This is because you don't actually loop, as you return Tru… Read more How Come In This Code To Find Prime Numbers, Is_prime(9) Returns True?

Primality Test In Python

I'm trying to do a simple primality test in Python. Accoding to Wikipedia, a primality test is … Read more Primality Test In Python

How Do I Find The Sum Of Prime Numbers In A Given Range In Python 3.5?

I managed to create a list of prime numbers in a given range using this: import numpy as np num … Read more How Do I Find The Sum Of Prime Numbers In A Given Range In Python 3.5?

Euler 3 Python. Putting The Prime Numbers Into A List

Im still pretty new to python and I'm trying to get all of the prime numbers from 600851475143 … Read more Euler 3 Python. Putting The Prime Numbers Into A List

Find Prime Numbers In Range

def is_prime(number): for i in range(2, number): if number % 1 == 0 and number % i == 0… Read more Find Prime Numbers In Range

Merge Of Lazy Streams (using Generators) In Python

I'm playing with functional capacities of Python 3 and I tried to implement classical algorithm… Read more Merge Of Lazy Streams (using Generators) In Python

How Can I Convert An Absolutely Massive Number To A String In A Reasonable Amount Of Time?

This is quite an odd problem I know, but I'm trying to get a copy of the current largest prime … Read more How Can I Convert An Absolutely Massive Number To A String In A Reasonable Amount Of Time?