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
adelina 88 [10]
3 years ago
9

dam is writing a program that: 1) has the user guess a number, and 2) tells the user how many guesses it took to get the correct

answer. But when Adam tests the program, it always outputs that it took the user one guess, even when it takes many guesses. What error did Adam most likely make, and how should it be fixed?
Computers and Technology
1 answer:
Virty [35]3 years ago
6 0

Answer:

Adam had most likely made a logic error.

Explanation:

Adam should check his code for any wrong formulas used or wrong arithmetic symbols.

You might be interested in
Write a function called mul_time that takes a Time_Elapsed object and a number and returns a new Time_Elapsed object that contai
lisov135 [29]

# Write a function called mul_time that takes a Time object and a number and

# returns a new Time object that contains the product of the original Time and

# the number.

# Then use mul_time to write a function that takes a Time object that

# represents the finishing time in a race, and a number that represents the

# distance, and returns a Time object that represents the average pace (time

# per mile).

# Current Status: Complete

class Time(object):

   """ represents the time of day.

   attributes: hour, minute, second"""

time = Time()

time.hour = 3

time.minute = 0

time.second = 0

def time_to_int(time):

   minutes = time.hour * 60 + time.minute

   seconds = minutes * 60 + time.second

   return seconds

def int_to_time(seconds):

   new_time = Time()

   minutes, new_time.second = divmod(seconds, 60)

   time.hour, time.minute = divmod(minutes, 60)

   return time

def mul_time(time, multicand):

   time_int = time_to_int(time) * multicand

   new_time = int_to_time(time_int)

   if new_time.hour > 12:

       new_time.hour = new_time.hour % 12

#    print ("New time is: %.2d:%.2d:%.2d"

#    % (new_time.hour, new_time.minute, new_time.second))

   return new_time

# mul_time(time, 2)

def race_stats(time, distance):

   print ("The finish time was %.2d:%.2d:%.2d"

         % (time.hour, time.minute, time.second))

   print "The distance was %d miles" % (distance)

   average = mul_time(time, (1.0 / distance))

   print ("The average is: %.2d:%.2d:%.2d per mile"

         % (average.hour, average.minute, average.second))

race_stats(time, 3)

7 0
2 years ago
1) List at least five smaller behaviors you could break the complex behavior "brushing my teeth" into.
zhuklara [117]
Q1:
1. Go into the bathroom
2. Put toothpaste on the toothbrush
3. Place head of toothbrush on your teeth
4. Revolve in small circles
5. Repeat 4 for all of your teeth
6. Use water to wash away the toothpaste in you mouth
5 0
3 years ago
Read 2 more answers
The use of encryption and authentication protocols is the standard method of countering attempts to alter or insert transmission
enyata [817]

Answer:

a) true.

Explanation:

Encryption is a form of cryptography and typically involves the process of converting or encoding informations in plaintext into a code, known as a ciphertext. Once, an information or data has been encrypted it can only be accessed and deciphered by an authorized user.

Some examples of encryption algorithms are 3DES, AES, RC4, RC5, and RSA.

On the other hand, authentication can be defined as the process of verifying the identity of an individual or electronic device. Authentication work based on the principle of matching an incoming request from a user or electronic device to a set of uniquely defined credentials.

Basically, authentication ensures a user is truly who he or she claims to be, as well as confirm that an electronic device is valid through the process of verification.

Digital certificates, smart cards, picture passwords, and biometrics are used to perform an authentication.

<em>Hence, in cybersecurity the use of encryption and authentication protocols is the standard method of countering attempts to alter or insert transmissions. </em>

5 0
3 years ago
JavaScript uses which property to change the current content of HTML elements?
solong [7]

Answer:

innerHTML

Explanation:

3 0
3 years ago
When computer networks are connected to each other, the system is called a(n) ____.
KiRa [710]
LAN - Local area network :P
5 0
3 years ago
Other questions:
  • An ______ is a simplified image. [4 letters]​
    7·2 answers
  • A cast is required in which of the following situations? a. using charAt to take an element of a String and store it in a char b
    7·1 answer
  • Explain the role of the domain name system
    15·1 answer
  • What is the process of copying items from ram to a storage device?
    8·1 answer
  • When changing the formatting of a spreadsheet to make it more readable, you should use light blue text on a bright blue backgrou
    12·1 answer
  • The cylinder head and engine block are completely sealed by a A. valve seal. B. head gasket. C. intake manifold. D. spark plug
    11·2 answers
  • We can include following item(s) during configuration itemidentification:
    10·1 answer
  • Write a program that gets a list of integers from input, and outputs the integers in ascending order (lowest to highest). The fi
    5·1 answer
  • A network technician is attempting to add an older workstation to a Cisco switched LAN. The technician has manually configured t
    11·1 answer
  • Describe how learning can be accessed in your class?​
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!