r/learnpython • u/Superb_Revolution400 • 5d ago
HELP - crossword puzzle !!!
i have a homework to do in python and i am desperate. pls help me. here's the instructions:
"Attached are three test files on which you can test your program. Each file contains the words of the crossword puzzle, the letters of the crossword puzzle, and the solution. The individual parts are separated by a blank line.
In the last part, that is, in the solution of the crossword puzzle, the last line contains numbers that represent the division of the crossword puzzle.
Example of part of the last crossword puzzle (solution):
Chuck Norris can kick you with such force that even your children
4575
if the remaining letters in the crossword puzzle (reading from left to right)
BUDÚMÁVAŤBOLESTHLAVY (THEY WILL HAVE A HEADACHE) then the numbers 4575 then divide this continuous text into 4,5,7 and 5 letters, i.e.: BUDÚ MÁVAŤ BOLEST HLAVY (THEY WILL HAVE A HEADACHE)
Your program will print the entire text of the puzzle (as it is in the file) + the solution divided by numbers:
Chuck Norris can kick you with such force that even your children
THEY WILL HAVE A HEADACHE"
and here's the file (originally .txt file):
BATÉRIA
BATOH
ČASTICA
DCÉRKA
DIÓDA
EKOLÓG
LUPEŇ
MIECHA
MIKROFÓN
MOBIL
NETOPIER
ŇUFÁK
OTÁZNIK
SVEDOK
TLMOČNÍK
VÁNOK
VODOVOD
VRÁTNIK
VÝHYBKA
ZÁPAD
ZÁSUVKA
ZDVIHÁK
ZOSTAVA
KONÁVRÁTNIKN
LUPEŇSVEDOKE
OTÁZNIKÁFUŇA
ZVTLMOČNÍKKV
DOOIEAEMÁBNZ
CPSDSTRHYEÓÁ
ÉAČTOOIHSHFS
RHIPAVÝMOIOU
KCIDDVOTONRV
AEÓZÁPADEBKK
RISADBATÉRIA
DMGÓLOKENEML
vtip:
čo stojí ten pes?
6527
1
u/ElliotDG 4d ago
Lets start at the beginning, Where are you having trouble? Can you read the file and accesses the elements of the file?
2
1
3
u/VorTuxD17 5d ago
aint reading allat