Python Installation






1) PYTHON IDLE INSTALLATION Using Python .exe file

Step1st:-


We can Install Python easily go into www.python/org and click on download and download python.exe file, double click it and install it.


https://www.python.org/downloads


for window 7 and before:-  Python 2.7 version should be installed.

After this version, we can install Python 3:



Step2nd:-


Open Python IDLE (Integrated Development Learning Environment)

By Default IDLE Provide Terminal mode which is for instant script execution.


step3rd:-

Click on File---> New File Option---> Write Python Script


print("Welcome in Python Script")
print("It is a script-based programming language which was created by GUIDO VAN RASSUM")


step4th:-


Save this file using the .py extension and click on the run option or press the F5 button.



Write a program to calculate Simple Interest?

p=450000
r = 7.5
t =10
si = (p*r*t)/100
A = p+si

print("Total amount will be ",A)      
print("Total interest will be ",si)


Write a program to perform the addition of two numbers?

a=100
b=200
c=a+b
print(c)

....................
........................................................................................................................................

PYTHON INSTALLATION USING JUPYTER ONLINE TOOLS:-

Jupyter provides a Jupyter notebook that provides a completely online platform where we can easily execute Python Script Online.
We can execute python script on mobile applications also.




.......................................................................................................................................................


1)open browser and type jupyter.org/try

https://jupyter.org/try


2) Click on Try Jupyter Lab menu option



3) IT will redirect to Jupyter notebook with Jupyter Lab option


4)  Click on Python3 it will open the Jupyter notebook block


5)  Write code and execute this

WAP to SWAP Two numbers using Third Variable?

a=10
b=20
print(a,b)
temp=a
a=b
b=temp
print(a,b)


WAP to SWAP WITHOUT UISNG Third Variable?

a=10
b=20
a,b = b,a
print("a=",a," b= ",b)




ASSIGNMENT:-

WAP to calculate simple interest?

WAP to reverse the three-digit number?  123  or 321

Solution:-

a=123
print(a)
num1 = a%10  #3
a =(int)(a/10)   #12
num2 = a%10 #2
num3 = a//10 #1
res = num1*100+num2*10+num3*1
print(res)

WAP to display the middle number using the order in a three-digit number?  a 145,154,451   4

WAP to calculate Square and Cube of any assigned number?




1 Comments

If you have any doubt in programming or join online classes then you can contact us by comment .

  1. wap find square and cube of number
    a=5
    print(a*a)
    print(a*a*a)

    ReplyDelete

Post a Comment

If you have any doubt in programming or join online classes then you can contact us by comment .

Previous Post Next Post