Itzel21
Profilo di
Nome | Itzel21 |
---|---|
Indirizzo email | n/a |
Messaggi | 2 |
-
- 2025-03-04 02:57:15
- Re: Problema con while
- Forum >> Principianti
- Daniele aka Palmux said @ 2025-02-12 23:59:39:Ciao e benvenuta, l'errore principale è che, all'interno del ciclo, usi l'operatore di divisione normale / che restituisce un numero in virgola mobile. Così facendo, anche se n tende a zero, non diventa mai esattamente 0 e il ciclo while non termina mai.
Per sistemare il problema, dovresti usare la divisione intera // così che n diventi un intero ad ogni iterazione e il ciclo si fermerà quando n diventerà 0.
Prova e fammi sapere se così riesci.
CyaGiusto! Utilizzando la divisione intera // si garantirà che il ciclo si interrompa in tempo, evitando errori di ciclo infinito dovuti ai numeri in virgola mobile.
-
- 2025-02-24 14:23:18
- Re: Negare accesso a un file ad altre applicazioni
- Forum >> Programmazione Python >> Files e Directory
- If you want to protect your file from outside editing, the best way is to use encryption. You can encrypt the file with a key that only your application knows, and then require the application to decrypt it before using it. Snow Rider ensures that even if someone finds the file, they can't edit it without the decryption key.