1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
jek_recluse [69]
2 years ago
15

Again, suppose that n and r denote integer values where r > 0 and n ≥ 0. What are two "simple" values, say lowEnough and tooH

igh, such that lowEnough ≤ ⌊n√r⌋⌊nr⌋ < tooHigh. Explain based on your answer to the previous question.
Suppose you would like to know ⌊47226−−−−−√5⌋⌊472265⌋. Explain how you could find ⌊47226−−−−−√5⌋⌊472265⌋ using a guess and verify method. Note: Explain your answer by relating this problem to the number guessing game described earlier. Think about what would be an appropriate question to use in place of "Is secret_number < guess_number?" and think about good choices for the starting values of lowEnough and tooHigh.
Computers and Technology
1 answer:
enyata [817]2 years ago
6 0

Answer:

Answer explained

Explanation:

From the previous question we know that while searching for n^(1/r) we don't have to look for guesses less than 0 and greater than n. Because for less than 0 it will be an imaginary number and for rth root of a non negative number can never be greater than itself. Hence lowEnough = 0 and tooHigh = n.

we need to find 5th root of 47226. The computation of root is costlier than computing power of a number. Therefore, we will look for a number whose 5th power is 47226. lowEnough = 0 and tooHigh = 47226 + 1. Question that should be asked on each step would be "Is 5th power of number < 47227?" we will stop when we find a number whose 5th power is 47226.

You might be interested in
SOMEONE PLEASE HELP ME OUT WITH THIS!!!!!!
mario62 [17]

Answer:

C.

Explanation:

8 0
3 years ago
Read 2 more answers
Which tab is used to insert a hyperlink onto a slide?
babunello [35]

the answer is C. Insert

3 0
3 years ago
Write a program that unpickle's employee dictionary and while reading from the dictionary, it allows users to lookup an employee
melamori03 [73]

Answer:

Check the explanation

Explanation:

from Employee import *

import pickle

import random

def unpickle_employee(filename):

file=open(filename,'rb')

data=pickle.load(file)

file.close()

return data

def pickle_employee(data,filename):

file=open(filename,'wb')

pickle.dump(data,file)

file.close()

if __name__=='__main__':

filename="Employees.dat"

'''

E=Employee("Ajay",1,"R&D","Manager")

data={}

data[1]=E

pickle_employee(data,filename)

'''

data=unpickle_employee(filename)

 

while True:

print("\nData In Employee.dat")

for d in data:

print("Employe data: ",data[d].get_name(),"({},{},{})".

format(data[d].get_id_number(),data[d].get_department(),data[d].get_job_title()))

 

print("\n\n\t\tMenu")

print("To add new Employee, Enter a")

print("To update any Employee, Enter u")

print("To delete any Employee, Enter d")

print("Enter anything to quit")

choice=input("Enter: ")

if choice=='a':

id_number=random.randrange(100,200,1)

while id_number in data:

id_number+=1

if id_number>=200:

id_number=100

name=input("Enter the Name: ")

department=input("Enter the Department: ")

job_title=input("Enter the job title: ")

E=Employee(name,id_number,department,job_title)

data[id_number]=E

elif choice=='u':

id_number=int(input("Enter the Employee id_number to update: "))

for d in data:

print(id_number,d,d==id_number)

if id_number in data:

print("Employe data: ",data[id_number].get_name(),"({},{})".

format(data[id_number].get_department(),data[id_number].get_job_title()))

print("\nPlease Enter the details")

name=input("Enter the Name: ")

department=input("Enter the Department: ")

job_title=input("Enter the job title: ")

E=Employee(name,id_number,department,job_title)

data[id_number]=E    

else:

print("Employee doesn't exist\n")

elif choice=='d':

id_number=int(input("Enter the Employee id_number to delete: "))

if id_number in data:

print("Employe data: ",data[id_number].get_name(),"({},{})".

format(data[id_number].get_department(),data[id_number].get_job_title()))

choice=input("\nPlease Enter y to confirm, anything else to cancel: ")

if choice=='y':

del data[id_number]

else:

print("Employee doesn't exist\n")

else:

break

pickle_employee(data,filename)

7 0
3 years ago
Is a defense of a political position an argument
shutvik [7]

Answer:

yes

Explanation:

yyyyyyyyyyeeeeeeeeesssssss

8 0
2 years ago
1st answer will get brainliest!
valentina_108 [34]

The answer is program!

5 0
2 years ago
Read 2 more answers
Other questions:
  • Sanjay is giving a slideshow presentation on his entire college class and he is feeling quite nervous in order to share his pres
    9·1 answer
  • You can access various sites on the WWW by using hyperlinks or by
    14·1 answer
  • To move up one paragraph, press the ____ key(s). f1 alt up arrow up arrow ctrl up arrow
    8·1 answer
  • Identify the benefit of modeling to communicate a solution. ​
    11·2 answers
  • Callie Crystal owns and operates one of the most successful local coffee shops in Denver, called The Edgewater Café. Each time a
    5·2 answers
  • What statement best describes operating systems?
    12·1 answer
  • Using direct mapping, consider a 16-bit memory addresses, and a cache with 64 blocks, where each block is 8 bytes. What is the s
    8·1 answer
  • Which of these is the fastest transmission medium?
    11·2 answers
  • Look at the network topology. What will happen with the other computers if the computer breaks at the RED X?
    8·1 answer
  • Identify the correct answer in each item. Write your answer on the blank provided before
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!