Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 8:
- x = int (input("Enter Number : "))
- if x>=1 and x<=10:
- print("Number Is In First 10 Counting Numbers")
- if x>=11 and x<=20:
- print("Number Is In Second 10 Counting Numbers")
- if x>=21 and x<=30:
- print("Number Is In Third 10 Counting Numbers")
- else:
- print("It's not belongs any category")
- 9:
- x=34
- while x<=98:
- print(x)
- x=x+1
- 10:
- x=109
- while x>=45:
- print(x)
- x=x-1
- 11:
- x=0
- y=1
- while x<10:
- print(y)
- y=y+2
- x=x+1
- 12:
- modules = ["Computer Architecture","Data Structures And Algorithms","Wep Application Development"]
- print(modules)
- 13:
- odd = [1,3,5,7,9,11,13,15,17,19]
- print(odd[2:9])
- 14:
- ans = []
- for x in range(10):
- y=(x+1)*(x+1)
- ans.insert(x,y)
- for x in ans:
- print(x)
- 15 :
- def power(base,exp):
- ans=base
- for x in range(1,exp):
- ans = ans*base
- return ans
- x = int(input("Enter Base Value : "))
- y = int(input("Enter Exponent Value : "))
- print(power(x,y))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement