Questions: 5 831

Answers by our Experts: 5 728

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

Write a function inCircle that takes a point and a radius as a parameter. The function should return True if the point is inside the circle and False otherwise.



 Define a function that takes an argument. Call the function. Identify what code is the argument and what code is the parameter.


The below, python dictionary (my_fruits_dic) holds fruits and their price.

 

my_fruits_dic = {

    "Fruit": "Price", 

    "apple": 6.44, 

    "banana": 0.77, 

    "orange": 3.44,

}

 


(1) Add a new item "berries" with the value {blackberry: 1.24, blueberry: 3.14}.

Print myDic. (This new dictionary will be added without the berries key. It needs to be added as a nested dictionary under berries key).

Consider the following lines of Python code.
x = [589,'big',397,'bash']
y = x[2:]
u = x
w = y
w = w[0:]
w[0] = 357
x[2:3] = [487]

A variable used to send information to a function is called a ___________.



What is h(41)-h(40), given the definition of h below?

def h(n):
    s = 0
    for i in range(1,n+1):
        if n%i > 0:
           s = s+1
    return(s)

What is h(41)-h(40), given the definition of h below?

def h(n):
    s = 0
    for i in range(1,n+1):
        if n%i > 0:
           s = s+1
    return(s)

What is h(41)-h(40), given the definition of h below?

def h(n):
    s = 0
    for i in range(1,n+1):
        if n%i > 0:
           s = s+1
    return(s)

One of the following 10 statements generates an error. Which one? (Your answer should be a number between 1 and 10.)

x = ["sun",[17],2,"king",[3,4]] # Statement 1
y = x[0:8]                      # Statement 2
z = x                           # Statement 3
w = y                           # Statement 4
z[0] = 0                        # Statement 5
y[0] = y[0][0:3] + 'k'          # Statement 6
y[1][1:3] = [5,8]               # Statement 7
x[0] = x[0][1:3]                # Statement 8
w[4][0] = 1000                  # Statement 9
a = (x[4][1] == 4)              # Statement 10

Write a program that asks the user for a word and then prints out that word:


LATEST TUTORIALS
APPROVED BY CLIENTS