Run a few simple programs in Python
Time to get our hands dirty now. We will use Python to run a simple program!
This exercise is part of the course
Introduction to Python & Machine Learning (with Analytics Vidhya Hackathons)
Exercise instructions
- The first line adds two numbers (1 & 2) and stores it in variable addition1.
- Write a line of code in line 4, which adds the number 3 and the number 4 and assigns it to a variable addition2
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
# Add 1 & 2 and assign it to addition1
addition1 = 1 + 2
# Now write code to add 3 & 4 and assign it to addition2