Why do the first 1000 primes summed in triplets yield exactly 12,000 unique prime sums? /u/AmongstYou666 Python Education

Why do the first 1000 primes summed in triplets yield exactly 12,000 unique prime sums? /u/AmongstYou666 Python Education

Hey everyone,

I’ve been working on a project where I sum combinations of the first 1,000 prime numbers taken 3 at a time. Interestingly, I ended up with exactly 12,000 unique prime sums. I’m trying to understand the mathematical reason behind this specific number of matches.

Here are a few details for context:

  • I generated the first 1,000 prime numbers.
  • I then created all possible combinations of these primes, three at a time.
  • After calculating the sums and filtering to keep only those sums that are prime, I ended up with 12,000 unique prime sums.

Does anyone have insights into why the number of unique prime sums from these combinations would be precisely 12,000? Is there a known mathematical property or formula that might explain this result?

Thanks in advance for your help!

submitted by /u/AmongstYou666
[link] [comments]

​r/learnpython Hey everyone, I’ve been working on a project where I sum combinations of the first 1,000 prime numbers taken 3 at a time. Interestingly, I ended up with exactly 12,000 unique prime sums. I’m trying to understand the mathematical reason behind this specific number of matches. Here are a few details for context: I generated the first 1,000 prime numbers. I then created all possible combinations of these primes, three at a time. After calculating the sums and filtering to keep only those sums that are prime, I ended up with 12,000 unique prime sums. Does anyone have insights into why the number of unique prime sums from these combinations would be precisely 12,000? Is there a known mathematical property or formula that might explain this result? Thanks in advance for your help! submitted by /u/AmongstYou666 [link] [comments] 

Hey everyone,

I’ve been working on a project where I sum combinations of the first 1,000 prime numbers taken 3 at a time. Interestingly, I ended up with exactly 12,000 unique prime sums. I’m trying to understand the mathematical reason behind this specific number of matches.

Here are a few details for context:

  • I generated the first 1,000 prime numbers.
  • I then created all possible combinations of these primes, three at a time.
  • After calculating the sums and filtering to keep only those sums that are prime, I ended up with 12,000 unique prime sums.

Does anyone have insights into why the number of unique prime sums from these combinations would be precisely 12,000? Is there a known mathematical property or formula that might explain this result?

Thanks in advance for your help!

submitted by /u/AmongstYou666
[link] [comments]  Hey everyone, I’ve been working on a project where I sum combinations of the first 1,000 prime numbers taken 3 at a time. Interestingly, I ended up with exactly 12,000 unique prime sums. I’m trying to understand the mathematical reason behind this specific number of matches. Here are a few details for context: I generated the first 1,000 prime numbers. I then created all possible combinations of these primes, three at a time. After calculating the sums and filtering to keep only those sums that are prime, I ended up with 12,000 unique prime sums. Does anyone have insights into why the number of unique prime sums from these combinations would be precisely 12,000? Is there a known mathematical property or formula that might explain this result? Thanks in advance for your help! submitted by /u/AmongstYou666 [link] [comments]

Read more

About python 3.13.0b2 no GIL option /u/CanalOnix Python Education

About python 3.13.0b2 no GIL option /u/CanalOnix Python Education

I downloaded the CPython no GIL version, in order to test some stuff; but i can’t find a single tutorial on how to use it without GIL, can someone help me?

Thanks in advance!

submitted by /u/CanalOnix
[link] [comments]

​r/learnpython I downloaded the CPython no GIL version, in order to test some stuff; but i can’t find a single tutorial on how to use it without GIL, can someone help me? Thanks in advance! submitted by /u/CanalOnix [link] [comments] 

I downloaded the CPython no GIL version, in order to test some stuff; but i can’t find a single tutorial on how to use it without GIL, can someone help me?

Thanks in advance!

submitted by /u/CanalOnix
[link] [comments]  I downloaded the CPython no GIL version, in order to test some stuff; but i can’t find a single tutorial on how to use it without GIL, can someone help me? Thanks in advance! submitted by /u/CanalOnix [link] [comments]

Read more

Invalid Json format /u/Krejziceek_ Python Education

Invalid Json format /u/Krejziceek_ Python Education

{“organization”: “Student Cyber Games”}

Hey there. this is the content of my json file but when I try to read the information it gives the error

{"error":"Invalid JSON format in data.json"} 

submitted by /u/Krejziceek_
[link] [comments]

​r/learnpython {“organization”: “Student Cyber Games”} Hey there. this is the content of my json file but when I try to read the information it gives the error {“error”:”Invalid JSON format in data.json”} submitted by /u/Krejziceek_ [link] [comments] 

{“organization”: “Student Cyber Games”}

Hey there. this is the content of my json file but when I try to read the information it gives the error

{"error":"Invalid JSON format in data.json"} 

submitted by /u/Krejziceek_
[link] [comments]  {“organization”: “Student Cyber Games”} Hey there. this is the content of my json file but when I try to read the information it gives the error {“error”:”Invalid JSON format in data.json”} submitted by /u/Krejziceek_ [link] [comments]

Read more

Is there any way to further shorten and/or optimise this calculator code? /u/Z9Cubing Python Education

Is there any way to further shorten and/or optimise this calculator code? /u/Z9Cubing Python Education

def trinumbers(): if confirm == 1: num1 = input("confirm Number 1: ") print(". + .") num2 = input("confirm Number 2: ") print(". + .") num3 = input("confirm Number 3: ") answer = num1 + num2 + num3 print(answer) elif confirm == 2: num1 = input("confirm Number 1: ") print(". - .") num2 = input("confirm Number 2: ") print(". - .") num3 = input("confirm Number 3: ") answer = num1 - num2 - num3 print(answer) elif confirm == 3: num1 = input("confirm Number 1: ") print(". x .") num2 = input("confirm Number 2: ") print(". x .") num3 = input("confirm Number 3: ") answer = num1 * num2 * num3 print(answer) elif confirm == 4: num1 = input("confirm Number 1: ") print(". / .") num2 = input("confirm Number 2: ") print(". / .") num3 = input("confirm Number 3: ") answer = num1 / num2 / num3 print(answer) 

`its very long, which i don’t like because i have to do this again for 4 numbers this time.` I need this to work on very low-spec computers (think on Dell latitude school laptops). So i need it to be well optimized. This is the only thing that i have tried to far, but i was thinking using

`for i in (3):`

and then something with num1 through 3, but im not sure about that one.

submitted by /u/Z9Cubing
[link] [comments]

​r/learnpython def trinumbers(): if confirm == 1: num1 = input(“confirm Number 1: “) print(“. + .”) num2 = input(“confirm Number 2: “) print(“. + .”) num3 = input(“confirm Number 3: “) answer = num1 + num2 + num3 print(answer) elif confirm == 2: num1 = input(“confirm Number 1: “) print(“. – .”) num2 = input(“confirm Number 2: “) print(“. – .”) num3 = input(“confirm Number 3: “) answer = num1 – num2 – num3 print(answer) elif confirm == 3: num1 = input(“confirm Number 1: “) print(“. x .”) num2 = input(“confirm Number 2: “) print(“. x .”) num3 = input(“confirm Number 3: “) answer = num1 * num2 * num3 print(answer) elif confirm == 4: num1 = input(“confirm Number 1: “) print(“. / .”) num2 = input(“confirm Number 2: “) print(“. / .”) num3 = input(“confirm Number 3: “) answer = num1 / num2 / num3 print(answer) `its very long, which i don’t like because i have to do this again for 4 numbers this time.` I need this to work on very low-spec computers (think on Dell latitude school laptops). So i need it to be well optimized. This is the only thing that i have tried to far, but i was thinking using `for i in (3):` and then something with num1 through 3, but im not sure about that one. submitted by /u/Z9Cubing [link] [comments] 

def trinumbers(): if confirm == 1: num1 = input("confirm Number 1: ") print(". + .") num2 = input("confirm Number 2: ") print(". + .") num3 = input("confirm Number 3: ") answer = num1 + num2 + num3 print(answer) elif confirm == 2: num1 = input("confirm Number 1: ") print(". - .") num2 = input("confirm Number 2: ") print(". - .") num3 = input("confirm Number 3: ") answer = num1 - num2 - num3 print(answer) elif confirm == 3: num1 = input("confirm Number 1: ") print(". x .") num2 = input("confirm Number 2: ") print(". x .") num3 = input("confirm Number 3: ") answer = num1 * num2 * num3 print(answer) elif confirm == 4: num1 = input("confirm Number 1: ") print(". / .") num2 = input("confirm Number 2: ") print(". / .") num3 = input("confirm Number 3: ") answer = num1 / num2 / num3 print(answer) 

`its very long, which i don’t like because i have to do this again for 4 numbers this time.` I need this to work on very low-spec computers (think on Dell latitude school laptops). So i need it to be well optimized. This is the only thing that i have tried to far, but i was thinking using

`for i in (3):`

and then something with num1 through 3, but im not sure about that one.

submitted by /u/Z9Cubing
[link] [comments]  def trinumbers(): if confirm == 1: num1 = input(“confirm Number 1: “) print(“. + .”) num2 = input(“confirm Number 2: “) print(“. + .”) num3 = input(“confirm Number 3: “) answer = num1 + num2 + num3 print(answer) elif confirm == 2: num1 = input(“confirm Number 1: “) print(“. – .”) num2 = input(“confirm Number 2: “) print(“. – .”) num3 = input(“confirm Number 3: “) answer = num1 – num2 – num3 print(answer) elif confirm == 3: num1 = input(“confirm Number 1: “) print(“. x .”) num2 = input(“confirm Number 2: “) print(“. x .”) num3 = input(“confirm Number 3: “) answer = num1 * num2 * num3 print(answer) elif confirm == 4: num1 = input(“confirm Number 1: “) print(“. / .”) num2 = input(“confirm Number 2: “) print(“. / .”) num3 = input(“confirm Number 3: “) answer = num1 / num2 / num3 print(answer) `its very long, which i don’t like because i have to do this again for 4 numbers this time.` I need this to work on very low-spec computers (think on Dell latitude school laptops). So i need it to be well optimized. This is the only thing that i have tried to far, but i was thinking using `for i in (3):` and then something with num1 through 3, but im not sure about that one. submitted by /u/Z9Cubing [link] [comments]

Read more

Recommend me some websites /u/Key-Time-8748 Python Education

Recommend me some websites /u/Key-Time-8748 Python Education

Hi! Can we guys recommend me please a good site with online compiler and solution for python beginers exercises ? Something like leetcode but beginner friendly.

submitted by /u/Key-Time-8748
[link] [comments]

​r/learnpython Hi! Can we guys recommend me please a good site with online compiler and solution for python beginers exercises ? Something like leetcode but beginner friendly. submitted by /u/Key-Time-8748 [link] [comments] 

Hi! Can we guys recommend me please a good site with online compiler and solution for python beginers exercises ? Something like leetcode but beginner friendly.

submitted by /u/Key-Time-8748
[link] [comments]  Hi! Can we guys recommend me please a good site with online compiler and solution for python beginers exercises ? Something like leetcode but beginner friendly. submitted by /u/Key-Time-8748 [link] [comments]

Read more

How to study python if you have brief knowledge beforehand? /u/EcstaticSweetheart Python Education

How to study python if you have brief knowledge beforehand? /u/EcstaticSweetheart Python Education

Hello.
So a bit background, im electrical engineer who been doing data analytics lately, as i go deeper the more i see that i need python skills. I was able to land a job as junior developer, the workplace knows i have very minimal experience with programming so no pressure from there but i feel like i need to get better. Also im enrolled in data sciences masters program so even there i need python. So we establised i need python.

About the workflow i have been doing right now. Basicly i put my task in the chatGPT or claude and ask it to generate code. Copy paste the code and run it. Doesnt work? paste error code into gpt and copy paste again until it works. Well it may be ok strategy for personal projects but i have been debugging 3 days for a code to parse xml file! Same for school projects.

Well why i dont write it myself? Im lacking skill in knowing WHAT to code or write, i dont know how to tackle it via programming. Let’s say task is to do electrical consumption analysis.
I know that i have to:
1) Import or get the data from somewhere (program, website etc)
2) data cleaning, make it readable
3) Analyse the data, calculate some mean values etc
4) Plot the results and make conclusions
But i dont have any idea how to import data from program for example, so i just ask gpt to generate me code for it. I know i can plot it via matplotlib and i need time on x axis and i plot it as sin graph but i dont know how to write it in python.

So how do i study with having some prior knowledge? ideally it would be cool if it would be relatable to the topics i need so i can right away practice those at work.

submitted by /u/EcstaticSweetheart
[link] [comments]

​r/learnpython Hello. So a bit background, im electrical engineer who been doing data analytics lately, as i go deeper the more i see that i need python skills. I was able to land a job as junior developer, the workplace knows i have very minimal experience with programming so no pressure from there but i feel like i need to get better. Also im enrolled in data sciences masters program so even there i need python. So we establised i need python. About the workflow i have been doing right now. Basicly i put my task in the chatGPT or claude and ask it to generate code. Copy paste the code and run it. Doesnt work? paste error code into gpt and copy paste again until it works. Well it may be ok strategy for personal projects but i have been debugging 3 days for a code to parse xml file! Same for school projects. Well why i dont write it myself? Im lacking skill in knowing WHAT to code or write, i dont know how to tackle it via programming. Let’s say task is to do electrical consumption analysis. I know that i have to: 1) Import or get the data from somewhere (program, website etc) 2) data cleaning, make it readable 3) Analyse the data, calculate some mean values etc 4) Plot the results and make conclusions But i dont have any idea how to import data from program for example, so i just ask gpt to generate me code for it. I know i can plot it via matplotlib and i need time on x axis and i plot it as sin graph but i dont know how to write it in python. So how do i study with having some prior knowledge? ideally it would be cool if it would be relatable to the topics i need so i can right away practice those at work. submitted by /u/EcstaticSweetheart [link] [comments] 

Hello.
So a bit background, im electrical engineer who been doing data analytics lately, as i go deeper the more i see that i need python skills. I was able to land a job as junior developer, the workplace knows i have very minimal experience with programming so no pressure from there but i feel like i need to get better. Also im enrolled in data sciences masters program so even there i need python. So we establised i need python.

About the workflow i have been doing right now. Basicly i put my task in the chatGPT or claude and ask it to generate code. Copy paste the code and run it. Doesnt work? paste error code into gpt and copy paste again until it works. Well it may be ok strategy for personal projects but i have been debugging 3 days for a code to parse xml file! Same for school projects.

Well why i dont write it myself? Im lacking skill in knowing WHAT to code or write, i dont know how to tackle it via programming. Let’s say task is to do electrical consumption analysis.
I know that i have to:
1) Import or get the data from somewhere (program, website etc)
2) data cleaning, make it readable
3) Analyse the data, calculate some mean values etc
4) Plot the results and make conclusions
But i dont have any idea how to import data from program for example, so i just ask gpt to generate me code for it. I know i can plot it via matplotlib and i need time on x axis and i plot it as sin graph but i dont know how to write it in python.

So how do i study with having some prior knowledge? ideally it would be cool if it would be relatable to the topics i need so i can right away practice those at work.

submitted by /u/EcstaticSweetheart
[link] [comments]  Hello. So a bit background, im electrical engineer who been doing data analytics lately, as i go deeper the more i see that i need python skills. I was able to land a job as junior developer, the workplace knows i have very minimal experience with programming so no pressure from there but i feel like i need to get better. Also im enrolled in data sciences masters program so even there i need python. So we establised i need python. About the workflow i have been doing right now. Basicly i put my task in the chatGPT or claude and ask it to generate code. Copy paste the code and run it. Doesnt work? paste error code into gpt and copy paste again until it works. Well it may be ok strategy for personal projects but i have been debugging 3 days for a code to parse xml file! Same for school projects. Well why i dont write it myself? Im lacking skill in knowing WHAT to code or write, i dont know how to tackle it via programming. Let’s say task is to do electrical consumption analysis. I know that i have to: 1) Import or get the data from somewhere (program, website etc) 2) data cleaning, make it readable 3) Analyse the data, calculate some mean values etc 4) Plot the results and make conclusions But i dont have any idea how to import data from program for example, so i just ask gpt to generate me code for it. I know i can plot it via matplotlib and i need time on x axis and i plot it as sin graph but i dont know how to write it in python. So how do i study with having some prior knowledge? ideally it would be cool if it would be relatable to the topics i need so i can right away practice those at work. submitted by /u/EcstaticSweetheart [link] [comments]

Read more

win32client /u/snoosnooeagle69 Python Education

win32client /u/snoosnooeagle69 Python Education

i use macos and im not able to install win32client since its only for windows. is there any alternative i can use for the module pr do i have to start over again onw windows? pls help also one choci for those who help

submitted by /u/snoosnooeagle69
[link] [comments]

​r/learnpython i use macos and im not able to install win32client since its only for windows. is there any alternative i can use for the module pr do i have to start over again onw windows? pls help also one choci for those who help submitted by /u/snoosnooeagle69 [link] [comments] 

i use macos and im not able to install win32client since its only for windows. is there any alternative i can use for the module pr do i have to start over again onw windows? pls help also one choci for those who help

submitted by /u/snoosnooeagle69
[link] [comments]  i use macos and im not able to install win32client since its only for windows. is there any alternative i can use for the module pr do i have to start over again onw windows? pls help also one choci for those who help submitted by /u/snoosnooeagle69 [link] [comments]

Read more