Debug the Following:
1. a=input(int("Enter your age)
Print("My age is",a)
Answers
Answered by
1
Explanation:
a=int("Enter your age");
System.out.Println("My age is"+a);
hope it helps
if it does then please do follow mw and mark me brainliest.
Answered by
6
a=input(int("Enter your age)
Print("My age is",a)
There are 3 main errors here.
- Text value in the int function has been closed with quotes.
- The 'p' in print is in uppercase.
- The int function has to input the value and not the other way round.
The correct code would be:
a = int(input("Enter your age: "))
print("My age is", a)
It's always important to close the text values with quotes.
Uppercase 'p' in Print can lead to a syntax error.
Similar questions