For the following function, specify the type of its return. You can assume each function is called with an appropriate argument, as specified by its docstring.   def f(x, y):    """    x: int or float.    y: int or float    """    x + y - 2   a. float b. int c. int or float d. NoneType e. boolean

EBK JAVA PROGRAMMING
8th Edition
ISBN:9781305480537
Author:FARRELL
Publisher:FARRELL
Chapter2: Using Data
Section: Chapter Questions
Problem 6RQ
icon
Related questions
Question

For the following function, specify the type of its return. You can assume each function is called with an appropriate argument, as specified by its docstring.

 

def f(x, y):

   """

   x: int or float.

   y: int or float

   """

   x + y - 2

 

a.

float

b.

int

c.

int or float

d.

NoneType

e.

boolean

 

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781305480537
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
LINUX+ AND LPIC-1 GDE.TO LINUX CERTIF.
LINUX+ AND LPIC-1 GDE.TO LINUX CERTIF.
Computer Science
ISBN:
9781337569798
Author:
ECKERT
Publisher:
CENGAGE L