Advertisement
Guest User

Untitled

a guest
Sep 23rd, 2019
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.44 KB | None | 0 0
  1. # Ecrit ton programme ici ;-)
  2. admin="yaaqoub"
  3. introduction=input("hello, i am the admin " + admin + " ,may i ask you some questions? ")
  4. if introduction=="yes" or introduction=="ok":
  5. name=input(" Ok, what is your name? ")
  6. else:
  7. print(" Ok, have a nice day ")
  8.  
  9. age=input("How old are you "+ name + "?")
  10. age1=int(age)
  11. if age1>=18 and age1<=50:
  12. question1=input("ok "+ name + " we play numbers?")
  13. else:
  14. print(" ok, have a nice day " + name)
  15. if question1=="yes" or question1=="ok":
  16. number1=input("enter a number please")
  17. number2=input("enter a seconde number please")
  18. num_1=int(number1)
  19. num_2=int(number2)
  20. result=(num_1+num_2)
  21. output=str(result)
  22. print(number1 + "+" + number2 + "=" + output)
  23. print("thanks for your colabortion " + name)
  24. else:
  25. print("thanks for your colabortion " + name)
  26. print("bye")
  27.  
  28. if age1>=20 and age1<=50:
  29. question2=input("you want that we do an area calculation "+ name + "? ")
  30. if question2=="yes" or question2=="ok":
  31. length=input("So,first you need to enter a length")
  32. Width=input("Now you enter a width,so i can calculate the area ")
  33.  
  34. elif qestion2=="no" or question2=="nop" or question2=="nono":
  35. print("ok, thanks, have a nice day ")
  36. else:
  37. print("Sorry, can't understand ")
  38. ar_1=int(length)
  39. ar_2=int(Width)
  40. result=(ar_1*ar_2)
  41. area=str(result)
  42. print("The area that you seek for is "+ area)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement