Skip navigation

Please use this identifier to cite or link to this item:
Title: Python Intermediate
Authors: Michaličková, Viera
Hernández-Figueroa, Zenón José
González-Domínguez, José Daniel
Rodríguez-del-Pino, Juan Carlos
Přichystal, Jan
Chromiński, Kornel
Keywords: Python; scripting language; programming
Issue Date: 2021
Publisher: Nitra : Constantine the Philosopher University in Nitra
Abstract: Let us test the following program, e. g. with the input values 7 and 2: a = int(input('a: ')) b = int(input('b: ')) print(a // b, a % b.The Output: a: 7 b: 2 3 1 Correct results (division and remainder) were calculated. Now again, but with other input values: The Output: a: 7 b: 0 Traceback (most recent call last): File ".../", line 3, in <module> print(a // b, a % b) ZeroDivisionError: integer division or modulo by zero An runtime error occurred while executing the program as we tried to divide a number by zero. The program got into an exceptional state (something unexpected or abnormal has happened), so its execution was stopped. We say, that an exception was raised. In this case, it was the ZeroDevisionError (we can see it from the output message) (...).
ISBN: 978-80-558-1784-2
Appears in Collections:Książki/rozdziały (WNŚiT)

Files in This Item:
File Description SizeFormat 
Michalickova_Python_intermediate.pdf1,43 MBAdobe PDFView/Open
Show full item record

Uznanie autorstwa - użycie niekomercyjne, bez utworów zależnych 3.0 Polska Creative Commons License Creative Commons