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
To configure a router/modem, what type of IP interface configuration should you apply to the computer you are using to access th
krok68 [10]

Answer:

You would temporarily assign it a fixed IP address in the same subnet as the router's default configuration.

Explanation:

If the router doesn't have DHCP enabled yet, your computer will not get an IP address, so you cannot communicate with it.

8 0
3 years ago
write a function that takes a string as parameter, return true if it’s a valid variable name, false otherwise. You can use keywo
never [62]

Answer:

The solution code is written in Python 3:

  1. import keyword  
  2. def checkValidVariable(string):
  3.    if(not keyword.iskeyword(string)):
  4.        return True  
  5.    else:
  6.        return False  
  7. print(checkValidVariable("ABC"))
  8. print(checkValidVariable("assert"))

Explanation:

Firstly, we need to import keyword module so that we can use its iskeyword method to check if a string is registered as Python keyword (Line 1).

Next, we create a function checkValidVariable that takes one input string (Line 3). Within the function body, we use iskeyword method to check if the input string is keyword. Please note the "not" operator is used here. So, if iskeyword return True, the True value will be turned to False by the "not" operator or vice versa (Line 4-5).

We test the function by passing two input string (Line 9-10) and we shall get the sample output as follows:

True

False

8 0
3 years ago
Fill in the blank
EastWind [94]

Answer:

It is called the ENQUIRE database

Explanation: got it right boooiiiii

7 0
3 years ago
Read 2 more answers
When saving a file, you must provide a valid file name that adheres to specific rules, referred to as _______________.
Naya [18.7K]

Answer:

a. file-naming conventions

Explanation:

File names need to follow certain criteria and constraints. Examples include:

  • File names must not start with special symbols.
  • File names can consist of letters,digits and special characters such as _.
  • File name can contain an extension after a dot sign.
  • File names must not be duplicates of an existing file.

Such constraints form part of file-naming conventions.

  • file-path represents the complete path to the file in the directory structure.
  • disk partition segments a hard disk into multiple volumes.
  • file-path starts from the root directory and spans one or more subdirectories to the location of the actual file.
6 0
3 years ago
Part of the central processing unit
AveGali [126]

Answer:

Explanation:

The arithmetic logic unit (ALU) performs mathematical, logical, and decision operations.  It can be divided into the arithmetic unit (responsible for addition, subtraction, multiplication and division).  And logic unit (responsible for comparing, selecting, matching and merging different data or information).  The power and efficiency of the CPU depends on the design of the ALU.  

Next up is the control unit (CU) which directs all the processor’s operations.  It’s where the CPU reads and interprets requests from memory and transforms them into a series of signals (binary).  Then it sends the operation to various parts of the laptop as instructed.  The CU calls the ALU to perform the necessary calculations.  It also coordinates all input/output devices to transfer or receive instructions.

The main job of the memory unit is to store data or instructions and intermediate results.  It’s divided into primary memory and secondary memory to supply data to other units of the CPU.  It allows the CPU to perform functions requested by programs like the operating system without having to ask RAM.

Another element of the CPU not depicted in the diagram is transistors.  To carry out calculations, binary information (ones and zeros) is stored in these microscopic switches.  They control the flow of electricity depending on whether the switch is ON or OFF.  Signals turn off and on different combinations of transistors to perform calculations.  A very thin silicon chip can contain several hundred million transistors.

8 0
3 years ago
Other questions:
  • Each organization that provides host services on the public Internet is responsible for providing and maintaining DNS authoritat
    7·1 answer
  • when seeking information on the on the internet about a variety of subjects the most useful place to look would be?
    13·1 answer
  • Advantage and disavantage of malware maintenance
    12·1 answer
  • What happens when a flash memory card is installed in a slot and it is recognized by windows?
    6·1 answer
  • Bayley wants to connect a new external hard drive to his Windows PC. He wants the fastest connection type available because he p
    9·2 answers
  • Difference between positional and non positional number​
    12·1 answer
  • Im getting hit offline can someone help or give me some advice
    6·1 answer
  • Brainliest For Tascake Because People Texted Before Tascake Could<br><br> Hurry Tascake
    13·2 answers
  • How can you prevent someone with access to a mobile phone from circumventing access controls for the entire device
    5·1 answer
  • ____ is an example of a set of prewritten classes that allows you to access data stored in a database.
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!