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
CaHeK987 [17]
3 years ago
14

Referring to the BST and BSTNode classes for binary search trees as done in class: Determine the result of executing root. whate

ver( ) given that whatever is an instance method of BSTNode as defined below, that A is an array of integers with the same number of elements as the tree, i is zero, and given the binary search tree that would result from inserting the following items in the order in which they are presented: 25, 12, 40, 28, 20, 15, 37, 17, 62
public void whatever() {
if (right != null) right.whatever(); if (left != null) left.whatever(); A[i++] = value;
}
Computers and Technology
1 answer:
Rzqust [24]3 years ago
3 0

Answer:

Try to add allthe numbers up

Explanation:

You might be interested in
"write a program to play and score the paper-rock-scissor game. each of two users types in either p, r, or s. the program then a
algol13

The program is an illustration of conditional statements.

Conditional statements are used to execute instructions, if and only if certain <em>condition or conditions </em>are met.

Take for instance: <em>If b = 5, print "ab"</em>

The above print statement will only be executed, if the <em>value of b is 5</em>

The paper-rock-scissor program in Python where comments are used to explain each line is as follows,  

#This imports the random module

import random

#This is used to control the repetition of the game

playagain ="T"

#The following is repeated until the user chooses not to play again

while(playagain == "T"):

   #This generates a random choice for the computer

   computer = random.choice(['Rock', 'Paper', 'Scissors'])

   #This gets input for the player

   player = input('Choose: ')

   #If the player and computer choose the selection

   if player == computer:

       #Then, it's a tie

       print('A tie - Both players chose '+player)

   #If the player wins

   elif (player.lower() == "Rock".lower() and computer.lower() == "Scissors".lower()) or (player.lower() == "Paper".lower() and computer.lower() == "Rock".lower()) or (player == "Scissors" and computer.lower() == "Paper".lower()):

       #This prints "player won" and the reason

       print('Player won! '+player +' beats '+computer)

   #If otherwise,

   else:

       #This prints "computer won" and the reason

       print('Computer won! '+computer+' beats '+player)

   #This asks if the player wants to play again

   playagain = input("Play again? T/F: ")

At the end of each round,

  • The program displays the winner
  • Or prints a tie, if there's a tie

See attachment for sample run

Read more about conditional statements at:

brainly.com/question/22078945

8 0
2 years ago
Numdu
gizmo_the_mogwai [7]
The question is unclear /unfinished please send again.
4 0
3 years ago
When you’re upset, you’re __ to get into a crash compared to when you’re not upset
Daniel [21]

Answer:

Your answer would be more likely.

Explanation:

When someone is upset and they are driving they usually have their music baring and the they can't hear their surroundings and all they can think about is what they are upset about so therefor they don't pay attention. Hope this helped! Have a great day! :)

7 0
3 years ago
Your license can be canceled if you __________
Elena L [17]
Its B i think hope this helps ! 
8 0
3 years ago
Read 2 more answers
Given the lists list1 and list2, not necessarily of the same length, create a new list consisting of alternating elements of lis
tester [92]

Answer:

The following code is written in Python Programming Language.

Program:

list1=[1,2,3]

 # initialized the list type variable

list2=[4,5,6,7,8]

  # initialized the list type variable

list3=[]

   # initialized the empty list type variable

for j in range(max(len(list1), len(list2))):   #set for loop

 if j<len(list1):

  #set if statement

   list3.append(list1[j])

  #value of list1 appends in list3  

 if j<len(list2):

   #set if statement

   list3.append(list2[j])

  #value of list2 append in list3

print(list3)    #print the list of list3

Output:

[1, 4, 2, 5, 3, 6, 7, 8]

Explanation:

Here, we define three list type variables "list1", "list2", "list3" and we assign value in only first two variables "list1" to [1, 2, 3] and "list2" to [4, 5, 6, 7, 8] and third list is empty.

Then, we set the for loop and pass the condition inside it we pass two if conditions, in first one we compare the list1 from variable "j" inside it the value in list1 will append in list3, and in second one we compare "j" with list two and follow the same process.

After all, we print the list of the variable "list3".

5 0
3 years ago
Other questions:
  • What is the slogan of the sociological school of criticism ?​
    9·1 answer
  • Is it just me or is brainly not working right now? I am trying to add friends and it won't let me!
    5·2 answers
  • Because many mobile devices and personal computers today are continually connected to the Internet, securing those devices again
    6·1 answer
  • On his computer desktop, Rodney can see several different files, each immediately accessible. Because he is actively working on
    13·1 answer
  • A person who creates a computer virus is a (1)system analyst (2) techician(3) programmer​
    11·2 answers
  • Write an application that inputs a five digit integer (The number must be entered only as ONE input) and separates the number in
    10·1 answer
  • When you login to your blogging account. The first screen with all controls, tools and functions is called .... Select one: a. D
    10·1 answer
  • 2. The Warren Commission investigated the assassination of President _______________________ in 1964.
    6·1 answer
  • Which of these would be the fastest transition duration?
    6·2 answers
  • Viruses that load from usb drives left connected to computers when computers are turned on are known as.
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!