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
Simora [160]
3 years ago
5

Create a for-loop which simplifies the following code segment: penUp(); moveTo(100,120); turnTo(180); penDown(); moveForward(25)

; penUp(); moveTo(100,120); turnTo(180); penDown(); moveForward(25); penUp(); moveTo(100,120); turnTo(180); penDown(); moveForward(25);
Computers and Technology
1 answer:
kvasek [131]3 years ago
7 0

Answer:

for(var i=0; i<3; i++) {

  penUp();

  moveTo(100,120);

  turnTo(180);

  penDown();

  moveForward(25);

}

Explanation:

The i variable is the loop dummy. The code block will be executed 3 times.

You might be interested in
What are the two main advantages to a well-designed relational database over other types?
lidiya [134]

The first and the most important advantage is that it supports a simple data structure, mainly tables. Familiar to many users, the table structure is an intuitive organization. Another main advantage of a relational database as compared to others is better security.  Once data are split into tables, certain tables can be made confidential.

3 0
3 years ago
Question # 9
Ganezh [65]

Answer:

flight stimulators are used to train astronaut and design simple air craft

8 0
2 years ago
Write a program called array1.cpp file that use either regular for loop or range based for loop to display the contents of the a
ch4aika [34]

Answer:

The program in C++ is as follows:

#include <iostream>

using namespace std;

void display(int array_test [], int n){

   for(int i = 0; i<n;i++){

       cout<<array_test[i]<<" ";   }

}

int main(){

   int n;

   cin>>n;

   int array_test[n];

   for(int i = 0; i<n;i++){

       cin>>array_test[i];

   }

   display(array_test,n);

   return 0;

}

Explanation:

This defines the display function

void display(int array_test [], int n){

This iterates through the array

   for(int i = 0; i<n;i++){

This prints each element of the array

       cout<<array_test[i]<<" ";   }

}

The main begins here

int main(){

This declares n as integer; n represents the length of the array

   int n;

This gets input for n

   cin>>n;

This declares the array

   int array_test[n];

The following iteration gets input for the array

   for(int i = 0; i<n;i++){

       cin>>array_test[i];

   }

This calls the display function to display the elements of the array

   display(array_test,n);

   return 0;

}

7 0
3 years ago
The rectangle shape in flowchart is used for
kvasek [131]
<h2>Start</h2>

The rectangle shape in flowchart is used to capture process steps like basic tasks or actions in your process.

4 0
2 years ago
What is a feature of Print Preview? Fit to Document Fit to Margin Fit to Page Fit to Size
Rudiy27
Fit to page! Is a feature that
7 0
3 years ago
Read 2 more answers
Other questions:
  • Let’s say you are given the task of retouching a famous model’s photograph. To what extent will you retouch the image? In your o
    12·2 answers
  • Litmus-type test strips are used to test coolant for freeze protection and ?
    12·1 answer
  • List 5 major steps to make a bank deposit
    6·1 answer
  • How to attach a picture on brainily?
    8·1 answer
  • A typical setup for a ____ network would include computer users sharing a single internet connection.
    15·1 answer
  • When designing a user interface, you can choose between the _______ or ______ layout Group of answer choices
    6·1 answer
  • You are having difficulty changing permissions for a folder on an NTFS volume that was created by another user. How can you best
    6·1 answer
  • Code used when creating a hyperlink to a specific part of the same page.
    15·1 answer
  • Which of the following terms means the computer operating system automatically detects and installs the proper driver for a new
    9·1 answer
  • joe is in the planning stages to make sure that an upcoming company promotion during a major sporting event will not overwhelm h
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!