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
Alex787 [66]
3 years ago
9

How many times would the code in this loop repeat? ____________ for ( j = 0; j < 10; j++ ) { appendItem (myList, aNumber); }

Computers and Technology
1 answer:
Musya8 [376]3 years ago
4 0

Answer:

The answer to this question is given below in the explanation section.

Explanation:

The for-loop given in the question is:

for ( j = 0; j < 10; j++ )

{

      appendItem (myList, aNumber); //this loop append a number to a list myList

}

This loop starts from J variable's value zero and when J's value is less than 10, the loop iterate through its body until J's value becomes greater or equal to 10. As J's value exceed nine, the loop will get terminated.

So this loop repeats 10 times its loop body, at the 11th time, the condition becomes false and the loop will get terminated.

You might be interested in
what properties are associated with all Microsoft Office files and include author, title, and subject
dolphi86 [110]
<span>The standard properties are associated with all Microsoft Office files and include author, title, and subject.
</span> <span>By default, </span>Microsoft Office<span> documents are associated with a set of these </span>standard properties.<span> They make it easier to organize and identify your documents. </span>
6 0
3 years ago
What is the full word of"VPN"?​
pantera1 [17]

Answer:

Virtual Private Network.

Explanation:

A VPN helps protect your data when accessing the internet. It usually scrambles your IP location and encrypts your data.

5 0
3 years ago
Read 2 more answers
To output age for the user which of the following you need to use?
koban [17]

Answer:

D

Explanation:

A is declaring a variable

B is getting input from the user and storing it in variable age

C is outputting the word "age" to the screen

D is outputting the word "age" to the screen and then outputting the value of the age variable immediately after which is correct.

6 0
3 years ago
Write a regular expression pattern that matches strings representing trains. A single letter stands for each kind of car in a tr
MAVERICK [17]

Answer:

See explaination

Explanation:

import re

def isValidTrain(train):

pattern = r'^E+(((P|PP|PPP|PPPP)D)*(BB)*)*C$'

if re.match(pattern, train):

return True

return False

def checkAndPrintTrain(train):

print("Train", train, "is valid:", isValidTrain(train))

checkAndPrintTrain("EC")

checkAndPrintTrain("EEEPPDBBPDBBBBC")

checkAndPrintTrain("EEBB")

checkAndPrintTrain("EBBBC")

checkAndPrintTrain("EEPPPPPPDBBC")

checkAndPrintTrain("EEPPBBC")

checkAndPrintTrain("EEBBDC")

Sample output

Train EC is valid: True

Train EEEPPDBBPDBBBBC is valid: True

Train EEBB is valid: False

Train EBBBC is valid: False

Train EEPPPPPPDBBC is valid: False

Train EEPPBBC is valid: False

Train EEBBDC is valid: False

6 0
3 years ago
(1) Prompt the user to enter five numbers, being five people's weights. Store the numbers in an array of doubles. Output the arr
Mashutka [201]

Answer:

weights = []

total = 0

max = 0

for i in range(5):

   weight = float(input("Enter weight " + str(i+1) + ": "))

   weights.append(weight)

   total += weights[i]

   if weights[i] > max:

       max = weights[i]

average = total / 5

print("Your entered: " + str(weights))

print("Total weight: " + str(total))

print("Average weight: " + str(average))

print("Max weight: " + str(max))

Explanation:

Initialize the variables

Create a for loop that iterates 5 times

Get the values from the user

Put them inside the array

Calculate the total by adding each value to the total

Calculate the max value by comparing each value

When the loop is done, find the average - divide the total by 5

Print the results

6 0
3 years ago
Other questions:
  • Three business partners are forming a company whose name will be of the form "name1, name2 and name3". however, they can't agree
    13·1 answer
  • Construct a regular expression that recognizes the following language of strings over the alphabet {0 1}:
    10·1 answer
  • When a member function is defined outside of the class declaration, the function name must be qualified with theWhen a member fu
    14·1 answer
  • A research team is studying parallel computing. They want to run parallel process without having to use multiple processors. How
    7·1 answer
  • A sequence of data values separated by commas can be made into a list by enclosing the sequence in what type of symbols?
    5·1 answer
  • "In a(n) _____ file, each alphabetic, numeric, or special character is represented with a 7-bit binary number."
    12·1 answer
  • What is the purpose of the "time-to-live" (TTL) field of the IPv4 packet? a. ensures that the packet remains in the network long
    6·1 answer
  • OMG 2 TIMES ;DDDDDDDDDDDDDDDDD​
    14·1 answer
  • Say yes if you hate edge2021?
    8·2 answers
  • Civil engineering structures are also called _________.
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!