Advertisement
Guest User

Untitled

a guest
Nov 14th, 2019
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.39 KB | None | 0 0
  1. # -*- coding: utf-8 -*-
  2. """
  3. Created on Thu Nov 7 14:09:37 2019
  4.  
  5. @author: matteo
  6. """
  7. """
  8. x = 3000
  9. a=0
  10. while (x < 3500):
  11. x = x*1.03
  12. a = a + 1
  13. print("il faudra ", a, "années pour avoir 3500€ sur son livret A")
  14.  
  15.  
  16. """
  17. """
  18. n1 = int(input("entrer le premier nombre" ))
  19. n2 = int(input("entrer le deuxieme nombre" ))
  20. p = n1 * n2
  21.  
  22. while (n1 != n2):
  23. if (n1 < n2):
  24. n2 -= n1
  25. else:
  26. n1 -= n2
  27. print(p/n1)
  28. """
  29.  
  30. """
  31. p = 100
  32. m = int(input("entrez le nombre de mètres souhaités: " ))
  33.  
  34. while (m > 1):
  35. m -= 1
  36. p += 40
  37. print("le prix à payer sera de: ", p )
  38. """
  39. """
  40. bdgt = int(input("entrez votre budget: " ))
  41. m = 1
  42. sous = 100
  43.  
  44.  
  45. while (bdgt > 0):
  46. bdgt -= sous
  47. sous += 40
  48. m += 1
  49. print("avec le budget dont vous disposez vous pouvez forrer", m, "mètres")
  50. """
  51. """
  52. ist = str(input("entrez la chaine de caractères: " ))
  53. x = len(ist)
  54. s = 0
  55. o = 'o'
  56. u = 'u'
  57. i = 'i'
  58. a = 0
  59. b = 1
  60. c = 2
  61. stop = 0
  62.  
  63. while (s <= x and stop == 0):
  64. if (ist[a - 1] == o and ist[b - 1] == u and ist[c - 1] == i):
  65. print("oui est present aux caractères : ", a, b, c )
  66. s += 1
  67. stop = 1
  68. else:
  69. a += 1
  70. b += 1
  71. c += 1
  72. s += 1
  73. """
  74.  
  75. st = str(input("entrez la chaine de caractères: " ))
  76.  
  77. result = st.find('oui')
  78. print("oui est detecté au caractère numéro: ", result )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement