Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #1.1.1
- x = int(input( " age ? : "))
- if x>=18 :
- print ("Adulte")
- #1.1.2
- x = int(input( " age ? : "))
- if x>=18 :
- print ("Adulte")
- else :
- print ("enfant")
- #1.1.3
- x = int(input( " age ? : "))
- if x>=18 :
- print ("Adulte")
- elif 12<x<18 :
- print ("Ado")
- else :
- print ("enfant")
- #1.1.4
- x = int(input( " age ? : "))
- if x>=18 :
- print ("Adulte")
- elif 12<x<18 :
- print ("")
- else :
- print ("enfant")
- #1.1.5
- x = int(input( " age ? : "))
- if x>=18 :
- print ("")
- elif 12<x<18 :
- print ("Ado")
- else :
- print ("")
- #1.1.6
- x = int(input( " age ? : "))
- if 18<=x<=150 :
- print ("Adulte")
- elif 12<x<18 :
- print ("Ado")
- elif 0<x<=12 :
- print ("enfant")
- else :
- print ("inhumain")
- #1.1.7
- tab=[1,2,3, "hey", "bonjour"]
- y = "hello"
- if len(tab)<=10:
- tab.append(y)
- print(tab)
- #1.1.8
- dico = {"bonjour":"hello"}
- print(dico)
- if ("age" not in dico):
- dico["age"]=20
- print(dico)
- #1.1.9
- x = int(input( " entrez un nombre : "))
- if x%2 == 0:
- print("pair")
- else:
- print("impair")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement