diff --git a/_episodes/03-types-conversion.md b/_episodes/03-types-conversion.md index 78a73a194..ee917fc36 100644 --- a/_episodes/03-types-conversion.md +++ b/_episodes/03-types-conversion.md @@ -168,6 +168,22 @@ print(str(1) + '2') ~~~ {: .output} +* This is not possible for every value + +~~~ +print(int('Ahmed')) +~~~ +{: .language-python} +~~~ +--------------------------------------------------------------------------- +ValueError Traceback (most recent call last) + in +----> 1 print(int('Ahmed')) + +ValueError: invalid literal for int() with base 10: 'Ahmed' +~~~ +{: .error} + ## Can mix integers and floats freely in operations. * Integers and floating-point numbers can be mixed in arithmetic.