Write the code in Python
1. To add four numbers(24,78,12,90) and display the result.
Answers
Answer:
Write a Simple Program in Python
1. Open your Start menu and choose Python (command line). You should get a prompt that looks like >>>. ...
2. At the prompt, type the following. Use a single quote at the start and the end — it's beside the Enter key: ...
3. Press the Enter key. Python runs the code you typed.
Answer:
- First we need to create a list of the following four numbers for which sum must be found
- After list is created sum function must be used
- Then total can be printed as usual
list1 = [24,78, 12,90]
total = sum(list1)
print("Sum of the given elements : ", total)
Extra info:
What is python ?
Python is a high level programming language unlike any assembly language which is used in various fields such as web development, ethical hacking, app development, AI (artificial intelligence), scientific computing,....etc. It is also used by famous institutions such as google,NASA, spotify,....etc.
Versions of python :
There are three versions of python namely 1.x,2.x and 3.x and these are further divided into many sub versions. Currently python 1.x and python 2.x are in use but python 3.x is more simpler compared to python 2.x.
Compiler for python:
We can use an additional softwarwe called PYcharm whic rectifies error in the program. This software comes in handy when we are doing web development as errors can be rectified easily.
Scope in future:
Python is used so much for app development and it will have a good scope in future. However JAVA engineers might earn more than python engineers and an average python developer earns nearly $110k per year.