Computer Science, asked by ThisUsernamesTooLong, 3 months ago

Rewrite the following python statements after correcting the errors (if any).

Attachments:

Answers

Answered by Equestriadash
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!
ThisUsernamesTooLong: Np! :)
Answered by swagat87
1

Question:-

1. Number1=float(input "Enter a number")

2. print(10×5)

3.class=integer(num1)+integer(num2)

correction:-

\bold{1.~Number1=float(input(" Enter ~a ~number "))   } 

\bold{2. ~ print(10*5)  } 

\bold{3.~class=int(num1)+int(num2)  }

Similar questions