Computer Science, asked by debnathaparajita, 9 months ago

For what value of n would g(637,n) return 4? If there are multiple possibilities, write any one.
def g(m,n):
res = 0
while m >= n:
(res,m) = (res+1,m/n)
return(res)

Answers

Answered by Anonymous
0

Database (Data) Tier − At this tier, the database resides along with its query processing languages. We also have the relations that define the data and their constraints at this level.

Application (Middle) Tier − At this tier reside the application server and the programs that access the database. For a user, this application tier presents an abstracted view of the database. End-users are unaware of any existence of the database beyond the application. At the other end, the database tier is not aware of any other user beyond the application tier. Hence, the application layer sits in the middle and acts as a mediator between the end-user and the database.

User (Presentation) Tier − End-users operate on this tier and they know nothing about any existence of the database beyond this layer. At this layer, multiple views of the database can be provided by the application. All views are generated by applications that reside in the application tier.

Answered by pesh20gathoni
0

Answer:

g(637, 5) = 4

Explanation:

Python Function :

A function is a block of code which only runs when it is called.

You can pass data, known as parameters, into a function.

A function can return data as a result.

def g(m,n):

res = 0

while m >= n:

(res,m) = (res+1,m/n)

return(res)

The above python function g(m,n)

res = floor(log(m) / log(n))

4 = floor(log(637) / log(n)

4 < log(637) / log(n) < 5

n < 10^(log(637)/4)

n < 5.02

n > 10^(log(637)/5)

n > 3.67

n is any float in the range [3.67, 5.02]

if n is integer, it's only either 4 or 5

Similar questions