Another doubt 🤷(this one I have just started so don't have a code ) | SoloLearn: Learn to code for FREE!

+1

# Another doubt 🤷(this one I have just started so don't have a code )

Write a program to prompt for a score between 0.0 and 1.0. If the score is out of range, print an error. If the score is between 0.0 and 1.0, print a grade using the following table: Score Grade >= 0.9 A >= 0.8 B >= 0.7 C >= 0.6 D < 0.6 F If the user enters a value out of range, print a suitable error message and exit. For the test, enter a score of 0.85.

5/17/2020 8:18:06 AM

-1

+7

prasad jagdale even the worsest start is better than none. After getting input just check if grade is A. As a beginner just do ONE aspect. Understanding will come with coding.

+5

Hi prasad jagdale no one has a code for a new problem, you have to write one. So please do it and come back. You just need an if else ladder.

+4

Fun fact: the Python documentation of the bisect function has a sample code for the exact same problem. :) However if you are a beginner, you should come up with a simpler solution on your own. https://docs.python.org/3/library/bisect.html

+3

a case for if....elif

+2

Ok Avinesh will paste here in sometime .

+2

Okay Tibor santa , Indeed I am a beginner and will try to come up with a simpler code .

+1

Thanks a lot Abhay bro