Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- سؤال 1
- x = 0
- while x < 20:
- a, b =input("Enter Number with kama : ").split(',')
- print(float(a) - float(b))
- x += 1
- ---------------------------------------
- سؤال 2 :
- chess = 0
- total = 0
- while chess < 64:
- chess += 1
- total = total + chess
- print(total)
- ---------------------------------------
- سؤال 3 :
- import random
- x = 0
- while x < 10:
- number = random.randint(100,170)
- f_number = number % 2
- if f_number != 0:
- print(number)
- x += 1
- ---------------------------------------
- سؤال 4 :
- tall = float(input("Enter The tall : "))
- width = float(input("Enter The Width : "))
- area = tall * width
- kind = 'square' if tall == width else 'Rectangular'
- print("the area of" , kind , "is", area)
- ---------------------------------------
- سؤال 5 :
- number = float(input("Enter A Number : "))
- msg = 'good' if number > 0 else 'Error'
- print (msg)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement