+ 9

What does ... program finished with exit code 0 mean in python ?

25th Apr 2020, 11:36 PM
Samah Mamour
34 Antworten
+ 12
This means that your code have successfully exited without any errors/problems.
25th Apr 2020, 11:52 PM
Arsenic
Arsenic - avatar
+ 10
0 means successful execution of code. 1 means unsuccessful execution...
25th Apr 2020, 11:53 PM
BroFar
BroFar - avatar
+ 7
Samah Mamour can you please show us your code so we can understand more as to how to address... As we stated 0 means successful execution.
26th Apr 2020, 12:08 AM
BroFar
BroFar - avatar
+ 7
right now I am finding several errors which I'm trying to work through... right now I'm running into naming issues and a few indention issues... Samah Mamour but I think I'm getting closer
26th Apr 2020, 12:51 AM
BroFar
BroFar - avatar
+ 5
Ok a quick translation by Google https://code.sololearn.com/cqJBJS8vdL94/?ref=app
26th Apr 2020, 12:38 AM
BroFar
BroFar - avatar
+ 4
contenter Samah Mamour or s'il vous plaît ... Je connais un peu de français
26th Apr 2020, 12:16 AM
BroFar
BroFar - avatar
+ 3
Code run successful
27th Apr 2020, 6:31 PM
Emmanuel
Emmanuel - avatar
+ 3
That will occur when your code have successfully exited without any errors.. Actually it is - 0 for successful execution of code & 1 for unsuccessful execution of code.
27th Apr 2020, 10:52 PM
Aseem Ranjan
Aseem Ranjan - avatar
+ 2
The problem is that my program isn't in english :( but french ! I will show you if you want ?
26th Apr 2020, 12:14 AM
Samah Mamour
+ 2
I think you can understand it i will show you :)
26th Apr 2020, 12:22 AM
Samah Mamour
+ 2
Valeur = value
26th Apr 2020, 12:33 AM
Samah Mamour
+ 2
Yes that's it did you find the error please ?
26th Apr 2020, 12:40 AM
Samah Mamour
+ 2
The exit code is what is returned to the operating system once the program finishes execution. It depends on the operating system you are running, but generally if 0 is returned, that signifies that it ran without any issues (exceptions, panics). If it is not 0, something may have gone wrong.
26th Apr 2020, 12:10 PM
s.f
+ 2
Thanks
26th Apr 2020, 10:55 PM
Samah Mamour
+ 2
Samah Mamour , thanks to BroFar (for translating this code) here I have tried removed all the syntactical errors in this code. 👇 https://code.sololearn.com/c58tLf7Iuigb/?ref=app
27th Apr 2020, 12:11 AM
Arsenic
Arsenic - avatar
+ 2
It means true as in boolean
27th Apr 2020, 10:28 AM
Isaac Duah [Active!]
Isaac Duah [Active!] - avatar
+ 2
Hacked please remove all the excessive comments as you are spamming and not giving relevant information to the question. Thanks and happy coding. https://code.sololearn.com/Wv5gTHy1N6Ji/?ref=app https://www.sololearn.com/discuss/1316935/?ref=app
27th Apr 2020, 10:22 PM
BroFar
BroFar - avatar
+ 1
But if there is no error why the compiler exit nd how can i solve it when there is no error ?
25th Apr 2020, 11:59 PM
Samah Mamour
+ 1
taille_page = int(input("entrez la taille d'une page virtuelle en octet: ")) nbr_page_v = int(input("entrez le nombre de page virtuelle: ")) nbr_cadres = int(input("entrez le nombre de cadres en mémoire physique: ")) contenu_cadres = [] print("maintenant veuillez ajouter le contenue des cadres en tapant (-1) si le cadre ne contient aucune page ,sinon tapez la valeur du numéro de page associé ! : ") for i in range(nbr_cadres): contenue=int(input()) contenu_cadres.append(contenue) num_adresse_recherché = int(input("entrez le numero de page à rechercher !: ")) adresse_virtuelle = num_adresse_recherché//taille_page décalage = num_adresse_recherché % taille_page print("la page que vous chercher se trouve dans la page {} avec un décalage de {}".format(adresse_virtuelle, décalage)) valeur = int(input("entrez la page que cherchez son cadre !: ")) for i in range(contenu_cadres): if i == ("valeur"): print(i)
26th Apr 2020, 12:27 AM
Samah Mamour
+ 1
Cadre = frame
26th Apr 2020, 12:27 AM
Samah Mamour