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]
3 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]3 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
What is the answer ??​
Natali5045456 [20]

<em>=</em><em> </em><em>Option</em><em> </em><em>b</em><em> </em><em>Minicomputer ..........</em>

3 0
2 years ago
Read 2 more answers
When you open a program, the hard drive___
Papessa [141]

Answer:

When you open a program, the hard drive <u>Registers the program and runs the program accordingly. </u>

I hope this helped!

3 0
3 years ago
What does coding mean​
NeTakaya
The process or activity of writing computer programs.
3 0
3 years ago
Read 2 more answers
HELP!!! What would var d=?
sergiy2304 [10]

Answer:

51015

Explanation:

Var b is a string, and it'll treat addition like <em>string concatenation </em>(aka just adding a message.) Since it's concatenation, it'll then turn the numbers/integers into strings.

This kind of behavior might be different depending on the language, though. Some languages might not allow this. (For example, C and C++)

7 0
3 years ago
Arrange the code so that the numbers are swapped.
Ahat [919]
Rand.int(your_num , your_num
5 0
3 years ago
Other questions:
  • Write a method that checks whether the input string or a sentence (a string with spaces) is a palindrome or not. The method shou
    13·1 answer
  • Of the three different types of résumé formats (chronological, functional, or combination), which format would you use to create
    11·2 answers
  • Which of the following is a special-purpose computer that functions as a component in a larger product?
    6·1 answer
  • which three objects can be linked or embedded in a word document? A. worksheets, margins, colors B. charts, worksheets, images C
    7·1 answer
  • The _______ of a secondary storage device indicates how much data the storage medium can hold.
    13·1 answer
  • The diagnostic test that involves watching a computer monitor with alternating checkerboard patterns while an eeg is performed i
    11·2 answers
  • Which of the following is an example of an output device
    13·1 answer
  • Very Short Answer Type Question (any 9)
    12·1 answer
  • Which feature allows you to copy attributes of
    11·1 answer
  • What is HDLC flow control?​
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!