Question: this is python please help # Do not change the following code. It is used to provide # a list of prime numbers for you

this is python

please help

# Do not change the following code. It is used to provide

# a list of prime numbers for you to use in the project


import sympy as sy

maxN = 50000

primes = list(sy.sieve.primerange(2,maxN+1))





#------------------------------------------------------

#------------------------------------------------------


# Part a)

# variable name: na

# Define an integer between 4 and maxN


# add code here


na = 4000


# Part b)

# variable name: factors_na

# Write a for loop to build a list of of the factors of na

# note: include 1 and na in the list


# example: na = 6, factors_na = [1,2,3,6]



# add code here




#------------------------------------------------------

#------------------------------------------------------


# Part c)

# variable name: nb

# Define an integer between 4 and maxN


# add code here



# Part d)

# variable name: prime_factors_nb

# Write a for loop to build a list of of the prime factors of nb

# note: nb is in the list if it is prime

# note: make use of the list primes above


# example: nb = 6, prime_factors_nb = [2,3]

# example: nb = 5, prime_factors_nb = [5]


# add code here


#------------------------------------------------------

#------------------------------------------------------


# Part e)

# variable name: twin_primes

# Write a for loop to build a list of of the twin primes below maxN

# hint: make use of the list primes above


# example: twin_primes = [3,5,7,11,13,17,19,29,31...]


# add code here


#------------------------------------------------------

#------------------------------------------------------


# Part f)

# variable name: factorials

# Write a for loop to build a list of factorials below maxN

# note: do not use while loops or break statements

# hint: use a binary search



# add code here




# Part g)

# variable name: factorial_primes

# Write a for loop to build a list of of the factorial primes below maxN

# hint: make use of the list primes above

# hint: make use of the list factorials above


# example: factorial_primes = [2,3,5,...]


# add code here



Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!