Computer Science, asked by ishwajgupta78, 3 months ago

how to do this
python work

Attachments:

Answers

Answered by Equestriadash
8

m = float(input("Enter the marks secured: "))

if m >= 250:

   print("Congratulations! You have scored A grade!")

elif m >= 200 and m <= 200:

   print("Well done! You have scored B grade!")

elif m < 200:

   print("Well tried! You have scored C grade!")

We use the float() function so that the data that is input by the user can be accepted as a float value, since it's possible to score decimal scores. If we were to use int(), and the user enters a float value, it will result in an error.

To print the grades, we use conditional statements, if-elif. They're used for testing out conditions and processing the further commands according to the given requirement.

Answered by anshu6313
1

Answer:

correct answers please mark brainliest please like

Attachments:
Similar questions