Jump to content

Python: Elemente comune fisiere / +file overlapping


Recommended Posts

Posted

Se vor oferi doua fisiere text care conțin liste de numere in ele. Construiți un algoritm care să găsească numerele comune ambelor liste. Un fisier .text are o lista cu toate numerele prime până la 1000, iar celalalt fisier text are o listă cu toate numerele fericite până la 1000.

 

Numerele fericite ( Happy Numbers ) - Click on -» Wikipedia source

 

file-overlapping.png

 

 

 

file_overlap.py

numere-fericite.txt

numere-prime.txt

  • Like 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...