primes tag

7 questions


2 answers
86 views
0
I have a question about the direction of the Python cord.

If you enter an integer, you want to write a code that you want to represent as a sum of three decimal places.Example) 10=2+3+5Currently, I wrote the most basic decimal discrimination function and the...

1 years ago

2 answers
116 views
0
[Python] Get the number of decimal places and print out the number of decimal places

Hi, everyone.I'm asking you a question because I didn't get it while studying Python.You want to receive a decimal number and print it out as many as you wrote in the title. I want to get an answer by...


1 answers
76 views
0
I'm going to make a list of prime numbers

prime = [1,2,3,5,7]factors = []for i in range(11,10000000,2): for j in range(2,i,2): if i % j ==0: factors.append(j) if factors == []: prime.append(i) print(i) else: break else: continueI'...

1 years ago

1 answers
81 views
0
C/C++ prime number discriminator

#include <iostream>using namespace std; int main(){int begin, end, i;int condition = 0;cout << Enter two integers between range 1 to 100 <<endl; cin >> begin >> end; whil...

1 years ago

1 answers
71 views
0
I'm going to make a decimal list with Python

import mathimport pickledef prime_list(n): sieve = [True] * (n+1) # true: prime, false: not prime. default: true for i in range(2, int(math.sqrt(n))+1): if sieve[i] == True: for j in range(i+i, n+1,...

1 years ago

1 answers
79 views
0
Is it possible to specify a decimal range with a phprand function?

I want to designate latitude and longitude as Busan range, so I want 35.xxxx /129.xxx decimal point to be random

1 years ago

1 answers
79 views
0
Python minority output program question. Help me

Output type (number is an example)Enter numeric characters:4Four is not a prime numberI want to print it out like this, I don't know how to get that {} number you entered.(Crying)I don't know if I pla...

2 years ago

© 2024 OneMinuteCode. All rights reserved.