geekcomputers / geekcomputers/Python

Multiple issues with the CountMillionCharacters family of programs.

Offen
#673 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Vorherrschende Sprache
Python
Sterne
35.4k
Forks
12.9k
Ø Merge
2 Std. 37 Min.
Gemergte PRs (30 T.)
1

Beschreibung

The README states:

CountMillionCharacter.py And CountMillionCharacter2.0.py - Gets character count of a text file.

Yet CountMillionCharacter2.0.py seems to be counting words, and says as much.

There is also a folder CountMillionCharacters-Variations which contains a third version of the program, named variation1.py. It would obviously be good to decide on what the CountMillionCharacters programs are meant to do, and the versions/variations to create.

For now, I think there are some changes to be made in at least two of the versions:

  • For one, dropping the use of .upper(), or at least replacing it with .casefold().
  • The use of .get() in variation1.py could be replaced with a defaultdict.
  • variation.py contains a camelCase variable name.
  • CountMillionCharacter.py uses exit() for seemingly no good reason.
  • CountMillionCharacter.py [calls main()] instead of exiting the program or using a loop.
  • ...and more.

I will try to tweak the code and create a pull request (or a few).

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Beginne mit den README-Einträgen für CountMillionCharacter.py und CountMillionCharacter2.0.py und vergleiche diese Dateien anschließend mit CountMillionCharacters-Variations/variation1.py. Entscheide und dokumentiere das beabsichtigte Verhalten und die Versionsstruktur, bevor du die aufgeführten Aspekte der Groß-/Kleinschreibung, die Verwendung von defaultdict, die Variablennamensgebung und den Programmbeendigungsablauf änderst; fertig ist die Aufgabe, wenn die Programme und die README übereinstimmen.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
python
Bereich
tooling
Issue-Typ
Refactoring
Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Aktivitätsstatus
Veraltet
Klarheit
Muss geklärt werden
Anfängerfreundlichkeit
25/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.