Exercise: IPython
Exercising coding with an IPython notebook.
We'll cover the following
Now that we know what an IPython notebook is and how it works, let’s relaunch the Python notebook and write a set of instructions to see what the output is.
Python program to add two numbers
Our task is to write a Python program to find the addition of num1 and num2.
Examples:
Input: num1 = 7, num2 = 10
Output: 17
Input: num1 = 23, num2 = 3
Output: 26
Click the “Click to launch app!” button and get started with the exercise.
Please login to launch live app!
We hope that the previous exercise was helpfuld for writing the code.
If not, no need to worry! Here is the Python code for adding two integers.
# Python3 program to add two numbersnumber1 = 7number2 = 10# Adding two nossum = number1 + number2# printing valuesprint("Sum of {0} and {1} is {2}" .format(number1, number2, sum))