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
Cloud [144]
2 years ago
13

What's wrong with these codes in code HS Karel challenges(7.1.2. Racing Karel) Codes: //Below is the program that have Karel mov

e around the race track 8 times, and end in his starting location. Everytime Karel hits a corner, he will put a ball down. At the end there should be 8 balls on each corner. function start(){ for(var i = 0; i < 5; i++){ ballSet(); wallRun(); turnLeft(); } function wallRun(){ while(frontIsClear()){ move(); } } function ballSet(){ putBall(); } }
Computers and Technology
1 answer:
Viktor [21]2 years ago
5 0

Answer:

The program only runs 5 five since the for loop statement is limited to loop only five times.

Explanation:

In programming, a for-loop statement is used to repeat a collection of events a definite number of times. The number of loops is specified and compared with a variable to execute a block of code.

The for-loop statement in the code above declares and initializes a variable "i" to zero, runs the block of code, and increments by one if it is less than 5.

To make it run eight times, the value five should be changed to 8 instead.

You might be interested in
How do you delete answers on Brain.ly?
Svetlanka [38]
Need to go to the settings
8 0
3 years ago
Read 2 more answers
The fundamental difference between a switch and a router is that a switch belongs only to its local network and a router belongs
Alla [95]

Answer:

The answer is True

Explanation:

Switches are responsible for connecting computers within a network and it belongs only to its local network. Its responsibility is to filter and forward packets between LAN segments. They operate on layer two (2) and sometime layer three (3) of the OSI Model.

Routers on the other hand, are responsible for the interconnections of two or more networks. They forward data packets between networks. They reside at gateways, exactly where two or more networks connects. And they use communication protocols to effectively and efficiently communicate among two or more host.

7 0
2 years ago
Largest of five (5 points). Write an algorithm that read 5 distinct integers and displays the largest value. Assume the input va
mrs_skeptik [129]

Answer:

import java.io.*;

public class Larger {

  public static void main(String[] args) throws IOException{

       BufferedReader br=new BufferedReader(new InputStreamReader(System.in));// reading input from buffered reader

        int a,max=-99999,i;

        for(i=1;i<=5;i++)

        {

            a=Integer.parseInt(br.readLine());//converting string input string to int

            if(a >max)

               max=a;

         

        }

       System.out.println("Maximum value : "+max);

  }

Explanation:

6 0
3 years ago
Mrs. Zoo gave out the rubric for our essay. She stated that our essay should be complete by Friday of that week. I didn't have t
Rom4ik [11]

Answer:

No

Explanation:

You had the whole week for the essay but didn't do it and then turned it in late.

6 0
3 years ago
4.8 Code Practice: Question 1
Furkat [3]

Answer:

c = 1 # global variable

    jhjl jh

def add(): c = 1 # global variable

def add():

   print(c)

add()

   c = c + 2 # increment c by 2

   print(c)

add()

Explanation:

4 0
2 years ago
Read 2 more answers
Other questions:
  • After you enter the details for the first selected recipient in the New Address List dialog box, click _______ to add another re
    11·2 answers
  • Write a function named delete Letter that has 2 parameters. The first parameter is a string, the second parameter is an integer.
    11·1 answer
  • What is the height of the tallest possible red-black tree containing 31 values?
    7·1 answer
  • my airpods just do not seem to connect if i try to pair them, reset them, they have this continuous green light, please help me
    12·1 answer
  • What tool is provided in Windows to facilitate sharing data objects between applications and computers?
    8·1 answer
  • What is virtualization?
    11·2 answers
  • Whate is function of northe bridge<br>​
    12·1 answer
  • Using a third-party package of your choice, write a program that reads the contents of a csv file and saves it to an Excel file.
    10·1 answer
  • Which of the following are true about algorithms? (You may select more than one)
    12·1 answer
  • In which of the following movies, multimedia's special effect is used ? *
    8·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!