Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please make sure not to have any statements outside of any functions. There is only one statement which is outside of any function which is

image text in transcribedimage text in transcribed

Please make sure not to have any statements outside of any functions. There is only one statement which is outside of any function which is given below:

i-e main( )

Also, make sure to code in python IDLE when providing solution

Write a function gradeit ( ) that takes a number x as grade in number and return a letter grade. The valid number range is between 0 and 100 . The function should do the following: - return "A" if number is greater than or equal to 80 - return "B" if number is greater than or equal to 50 - return " C " if number is less than 50 - return "I" if number is out of range directions. Using the following constructs will result in 0 (zero) for the entire submission (assignment, timed test, etc.). The restricted items are as follows: - Concepts not discussed in lectures yet - String functions - Member functions - Exceptions (can use) : /en () and x=x+[y1,y2,y3] - Built-in functions \& types - Exceptions (can use): str( ), readline( ), open(), close( ), write(), read( ), range( ), .split() - Cannot use .append, .sort, etc. - Cannot use "Slicing" - Cannot use "list comprehension" - Cannot use "not in" (together) - Cannot use "in" - not allowed with conditionals - Exception (can use): with range () - Cannot use and \{\} - Exception (can use): mathematical operations (multiply \& exponents) - Data type functions - Exceptions (can use): int(), str (), float () - Break - Continue - Nested Constructs - Exceptions (can use): 2-D list - Multiple returns \& Multiple assignments - Recursion (not allowed unless the question explicitly states otherwise) - Functions within functions (Definitions) -- invocation is fine - Default Parameters - Global variables - Keyword as variable names

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Systems For Advanced Applications 27th International Conference Dasfaa 2022 Virtual Event April 11 14 2022 Proceedings Part 2 Lncs 13246

Authors: Arnab Bhattacharya ,Janice Lee Mong Li ,Divyakant Agrawal ,P. Krishna Reddy ,Mukesh Mohania ,Anirban Mondal ,Vikram Goyal ,Rage Uday Kiran

1st Edition

3031001257, 978-3031001253

More Books

Students also viewed these Databases questions

Question

Why are incandescent bulbs typically made of very thin glass?

Answered: 1 week ago