Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

python Task 1 - Checking Evenness def is even(n): Determine if n is even or not. return True when it is even, and return False

python

image text in transcribed

Task 1 - Checking Evenness def is even(n): Determine if n is even or not. return True when it is even, and return False when it is not. o assume that n is an integer. It might be negative, zero, or positive, and your code needs to correctly answer if it's even (divisible by two) with a boolean value. Examples o is even(5) o is even (182) o is_even(-3) o is even(e) False True False True Task 2 Letter Grade Given an integer score, we determine the letter grade and return the string. Possible return values are "A+", "A", "A-", "B+", "", etc. It will exactly match our own semester's grading scale, so look at the grading scale in our syllabus if you need a refresher def letter_grade (score): Given a non-negative integer score, determine what the actual grade should be based on our semester grading scale; return a string directly representing that grade o score will be a non-negative integer Examples: o letter_grade (95)A" o letter_grade (89) o letter grade(61)D" Task 3 - Selectively Using Arguments This time, the function accepts three arguments. But we want to find the sum of only the two largest. def sum2biggest(a,b,c): Given three integer arguments, determine what the two biggest ones are, add them together, and return that result all three parameters a, b, and c will be integers; note that they can be positive, zero, or o negative. The same number might be given for more than one parameter's value. Examples o sum2biggest(5,3,4) o sum2biggest(-5, 3,-1) o sum2biggest (6,4,6) o sum2biggest (8,e,8) 12

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_2

Step: 3

blur-text-image_3

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

Visual Basic 4 Ole Database And Controls Superbible

Authors: Michael Hatmaker, C. Woody Butler, Ibrahim Malluf, Bill Potter

1st Edition

1571690077, 978-1571690074

More Books

Students also viewed these Databases questions