Rewrite the following python statements after correcting the errors (if any).
Attachments:
Answers
Answered by
10
Given statements:
- Number1 = float(input "Enter a number")
- Print (10x5)
- Class = Integer(num1) + Integer(num2)
Corrected statements:
- Number1 = float(input("Enter a number"))
- print(10*5)
- Class = int(num1) + int(num2)
Explanation:
1. Number1 = float(input "Enter a number")
- Missing brackets for the input function.
2. Print (10x5)
- Syntax error, 'p' in print must be in lower case.
- No spaces in the print statement.
- An asterisk (*) must be used for multiplication.
3. Class = Integer(num1) + Integer(num2)
- Integer() is not a function/method. int() however is.
Equestriadash:
Thanks for the Brainliest!
Answered by
1
Question:-
1. Number1=float(input "Enter a number")
2. print(10×5)
3.class=integer(num1)+integer(num2)
correction:-
Similar questions