Program Python Notepad
Program Python Notepad
import math
x=-1
for i in range(20):
print("x",(x))
x=x+.1
import math
for x in range(20):
y=x**2-2*x+8
print(x,y)
a=1
while a<=10:
print (a)
a=a+1
#write a python program to print sum of reciept amount until negative number is not
enter after then program should rteturn total of reciept number
a=1
s=0
while a>0:
a=int(input("enter a amount"))
if(a>0):
s=s+a
print(s)
a=0
while a<=10:
if a%2==0:
print(a)
a=a+1
#write a python program to print digit 5 by using while loop
a=1
i=0
while i<=10:
if a==5:
print(a)
a=a+1
i=3
while i<=30:
print(i)
i=i+3
table=int(input("enter a table"))
number=int(input("enter a number"))
limit=int(input("enter a limit"))
while number<=limit:
print(number*table)
number=number+1
a=2
for i in range(1,11):
print(a)
a=a+2
#write a python to print total reciept amount and number of reciept enter by the
user
a=0
s=0
nr=0
while a>=0:
a=int(input("enter a number"))
nr+=1
if a<=0:
print("total amouny",s)
print("total nuumber oif reciept",nr-1)
s=s+a