+ 1

I hope you can help me with this code?

The code is to sell cigarette to 18+ only. The user have to input is year of birth. https://code.sololearn.com/c6CuaAtU0WCW/?ref=app

8th Nov 2019, 4:03 PM
Abdulhakeem Jamiu Olaniyan
Abdulhakeem Jamiu Olaniyan - avatar
7 Respostas
+ 3
print ("Welcome! cigarrate is only sold to 18+") year= float(input("enter your date of birth to get a cigarrate: ")) age= 2019-year print('your age is:',age) if age>=18: print ("Here you are") else: print ("you are too young for that") print ("remeber smokers are liable to die young")
8th Nov 2019, 4:12 PM
D Dheeraj
D Dheeraj - avatar
+ 2
Sbmjamiu is the code working ??
8th Nov 2019, 4:35 PM
D Dheeraj
D Dheeraj - avatar
+ 1
Yes, i am a newbie here, just trying to write a code and cigarette is actually sold to any body which is not suppose to be so.
8th Nov 2019, 4:26 PM
Abdulhakeem Jamiu Olaniyan
Abdulhakeem Jamiu Olaniyan - avatar
+ 1
Thanks for the correction
8th Nov 2019, 4:26 PM
Abdulhakeem Jamiu Olaniyan
Abdulhakeem Jamiu Olaniyan - avatar
0
By the way the purpose of this program is a bit bad
8th Nov 2019, 4:13 PM
D Dheeraj
D Dheeraj - avatar
0
By the way may i know your age
8th Nov 2019, 4:42 PM
D Dheeraj
D Dheeraj - avatar
0
I'm 16 Dheeraj.D
10th Nov 2019, 11:35 PM
Abdulhakeem Jamiu Olaniyan
Abdulhakeem Jamiu Olaniyan - avatar