+ 3

Can anyone help me with the output of my code?

Here is the code https://code.sololearn.com/caTX7G2P1UPt/?ref=app The output is :"Quel est ton age:T'es un majeur" ( depending of the value of age). But I want for output just "T'es un majeur" not the " Quel est ton age:". What should I do?

15th Aug 2018, 11:27 PM
Wilfried Diby
Wilfried Diby - avatar
6 Answers
+ 18
If you don't want a prompt for what to input at all, remove the string "Quel est ton age:" from input(). Or, if you want it on a separate line so it looks less messy, add \n to the end of the prompt.
15th Aug 2018, 11:41 PM
Tamra
Tamra - avatar
+ 3
Ne t'en fais pas Monsieur Wilfried Diby.Juste revise ce code un autre moment.Pour moi,je n'apercois rien d'erreur.
16th Aug 2018, 2:37 AM
CelestinošŸ‡°šŸ‡ŖšŸ‡«šŸ‡·
CelestinošŸ‡°šŸ‡ŖšŸ‡«šŸ‡· - avatar
+ 3
Ooh,Elimine "Quel est ton âge:T'es un majeur" de input().Oui,je pense qu'il est problème
16th Aug 2018, 2:41 AM
CelestinošŸ‡°šŸ‡ŖšŸ‡«šŸ‡·
CelestinošŸ‡°šŸ‡ŖšŸ‡«šŸ‡· - avatar
+ 3
Your code is fine, the issue is with how Sololearn's python processes input. If you want it to look better here, try one of Tamra's methods, or add print(age) before line 2. This will show the user's age after the prompt "Quel est ton age:", and automatically add a line break because of the print statement.
16th Aug 2018, 2:44 AM
Kishalaya Saha
Kishalaya Saha - avatar
+ 3
Your code is fine there no wrong you need to just a remove one line from your code. check it. https://code.sololearn.com/ckcWY70NU68z/?ref=app
16th Aug 2018, 2:58 AM
Maninder $ingh
Maninder $ingh - avatar
+ 1
just put input()
16th Aug 2018, 10:22 AM
Marse
Marse - avatar