Just printing hello world is not enough, is it? You want to do more than that - you want to take some input, manipulate it and get something out of it. We can achieve this in Python using constants and variables, and we'll learn some other concepts as well in this chapter.
In all the programs we wrote till now, we have designed our program around functions i.e. blocks of statements which manipulate data. This is called the procedure-oriented way of programming. There is another way of organizing your program which is to combine data and functionality and wrap it inside something called an object. This is called the object oriented programming paradigm.
Learn how to use Python Operators and Expressions
Data structures are basically just that - they are structures which can hold some data together. In other words, they are used to store a collection of related data.
There will be situations where your program has to interact with the user. For example, you would want to take input from the user and then print some results back. We can achieve this using the input() function and print function respectively.
showing 5 of 7 entries