WhatÔÇÖs wrong with this code? | Sololearn: Learn to code for FREE!
Neuer Kurs! Jeder Programmierer sollte generative KI lernen!
Kostenlose Lektion ausprobieren
+ 1

WhatÔÇÖs wrong with this code?

There is something wrong with this code and I cant figure it out. age = int(input("How old are you?") if age > 50: print ("HAH! Im older then you!") elif age < 50: print ("Come on! Im supposed to be older!") else: print ("We are the same age? Cool!")

20th Feb 2021, 9:48 AM
Canon Lucai-Sample
Canon Lucai-Sample - avatar
2 Antworten
+ 8
The type of error has been mentioned! And I thank you forgot a paranthesis when calling "age" variable. You wrote: age = int(input("How old are you?") But it should be: age = int(input("How old are you?")) (A second closing paranthesis at the end)
20th Feb 2021, 10:00 AM
Stefan - avatar
+ 5
It seems that your forgot some closing parenthesis.
20th Feb 2021, 9:53 AM
Th├ęophile - avatar