Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # -*- coding: utf-8 -*-
- """
- Created on Thu Nov 7 14:09:37 2019
- @author: matteo
- """
- """
- x = 3000
- a=0
- while (x < 3500):
- x = x*1.03
- a = a + 1
- print("il faudra ", a, "années pour avoir 3500€ sur son livret A")
- """
- """
- n1 = int(input("entrer le premier nombre" ))
- n2 = int(input("entrer le deuxieme nombre" ))
- p = n1 * n2
- while (n1 != n2):
- if (n1 < n2):
- n2 -= n1
- else:
- n1 -= n2
- print(p/n1)
- """
- """
- p = 100
- m = int(input("entrez le nombre de mètres souhaités: " ))
- while (m > 1):
- m -= 1
- p += 40
- print("le prix à payer sera de: ", p )
- """
- """
- bdgt = int(input("entrez votre budget: " ))
- m = 1
- sous = 100
- while (bdgt > 0):
- bdgt -= sous
- sous += 40
- m += 1
- print("avec le budget dont vous disposez vous pouvez forrer", m, "mètres")
- """
- """
- ist = str(input("entrez la chaine de caractères: " ))
- x = len(ist)
- s = 0
- o = 'o'
- u = 'u'
- i = 'i'
- a = 0
- b = 1
- c = 2
- stop = 0
- while (s <= x and stop == 0):
- if (ist[a - 1] == o and ist[b - 1] == u and ist[c - 1] == i):
- print("oui est present aux caractères : ", a, b, c )
- s += 1
- stop = 1
- else:
- a += 1
- b += 1
- c += 1
- s += 1
- """
- st = str(input("entrez la chaine de caractères: " ))
- result = st.find('oui')
- print("oui est detecté au caractère numéro: ", result )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement