arianramianpour - Hightechrobo Bin
  PYTHON   30

arianramianpour

Guest on 27th December 2021 08:42:52 AM

  1. #3
  2. a = int(input('please put a number here : '))
  3.  
  4. if a <= 100 and a >= 1 :
  5.     if a%2 == 0 :
  6.         print('its valid')
  7.     else :
  8.         print('its not valid')
  9. else :
  10.     print('its not valid')
  11.  #-------------------------------------------
  12. #4
  13. a = int(input('please enter the amounts of stars * :'))
  14. x=0
  15. if(a >= 0):
  16.     for x in range (1 , 1+a):
  17.         print('*')
  18. else:
  19.     print('not valid')
  20.  
  21. #------------------------------------------
  22. #5
  23. a = int(input('please enter the ammount of students '))
  24. if a >= 1 :
  25.     f=list()
  26.     for x in range (0 , 0+a) :
  27.         f.append(input('please enter name '))
  28.     f.sort()
  29.     print(f)
  30. else :
  31.     print('not valid')
  32. #-------------------------------------------------
  33. #7
  34. x = int(input('enter the number'))
  35. if x<0:
  36.     print("not valid")
  37. elif x==0:
  38.     fi= 0
  39. elif x==1:
  40.     fi= 1
  41. else:
  42.     fi = fi(x-1)+fi(x-2)
  43.  
  44. print(Fi)

Raw Paste


Login or Register to edit or fork this paste. It's free.