JOBS ESTATE FREE EMAIL ALERTS

Part-1: Introduction ,Installation and How to run Python Programs:

  • Developed by Guido van Rossum
  • Download python software from org website–>Downloads–>windows–>Latest Release–>end of the page click on windows x86-64 executable installer(windows 64 bit).
  • install –>add python 3.8 to path–>customize installation–>Next–>check on install for all users…Install.—>Read python tutorial from python team–>close.
  • Windows+R(run)–>type cmd and enter–>in cmd enter python–>displayed python release.
  • 2 ways to run programs–>i)enter code and execute in cmd . ii)write in notepad++(save .py extension for python programs)execute file in cmd.(Note:Always check python relased install version and python tutorial for that version).

Example:-Always should maintain indentation while writing programs in python

1)#program to demonstrate how to run python program

x=10;

if(x==10):

print(“x value is 10”);

print(“hi”);

else:

print(“x value is not 10”);

output: x value is 10

hi.

2)#program to demonstrate read input from user

x=int(input(“Enter x value”));

y=int(input(“Enter y value”));

print(x+y);

output:Enter x value50

Enter y value25

75

Note:-Below python 3 we have raw_input() function.within input() function have entered any value treated as string,so we have to give int before input() function.

© Copyright 2020 Jobs Estate All Rights Reserved