8.6 Code Practice: Question 1
Write a function named buildArray that builds an array by appending a given number of random two-digit integers (10-99). It should accept two parameters — the first parameter is the array, and the second is an integer for how many random values to add, which should be input by the user.

Print the array after calling buildArray

8.6 Code Practice: Question 1Write A Function Named BuildArray That Builds An Array By Appending A Given

Answers

Answer 1

In python 3.8:

import random

def buildArray(arr, nums):

   i = 0

   while i < nums:

       arr.append(random.randint(10,99))

       i+=1

arr = []

numbers = int(input("How many values to add to the array:\n"))

buildArray(arr, numbers)

print(arr)

I hope this helps!

Answer 2

The function named buildArray that builds an array by appending a given number of random two-digit integers (10-99) and accept 2 parameters is represented below

import random  

def buildArray(array, integer):

   i = 0

   while i < integer:

       array.append(random.randint(10, 99))

       i += 1

   return array

print(buildArray([], 12))

The code is written in python.

A function is declared called buildArray. This function accept 2 parameters which are arrays and integer.

i is use to declare a variable assigned to zero.

while i is less than the integer(one of the parameter), random number between 10 and 99 is appended to the parameter array.

The value of i keeps on increasing until it becomes less than the integer.

The filled array is returned.

Finally, we call the function with the required parameters.

The bolded portion of the code are keywords in python.  

read more: https://brainly.com/question/18612252?referrer=searchResults

8.6 Code Practice: Question 1Write A Function Named BuildArray That Builds An Array By Appending A Given

Related Questions

Which best describes what a works-cited list includes?

sources found during research
sources cited in a paper
sources quoted in a paper
sources examined during research

Answers

Answer: Sources cited in a paper

Explanation:

Answer:

B

Explanation:

Who you think is better? Ninja or TFue ,btw do you know who icebear is?

Answers

Answer:

no, no i dont think i will.

Explanation:

Which describes the qualifications for someone in Law Enforcement Services?
a. juggling multiple tasks, communication skills for interviewing people, and confidence in challenging suspicious people

b. knowledge of laws and procedures, accuracy when preparing legal documents, and integrity

c. communication skills for working with prisoners, ability to use handcuffs, self-control for working with angry people

d. social awareness and communication skills, first-aid skills, and knowledge of law and procedures

Answers

Answer:

D maybe

Explanation:

im not entirely sure but d seems most right

Answer:

yes it is d

Explanation:

d

PLEASE HELP!!
Computer networks allow computers to send information to each other. What is the term used to describe the basic unit of data passed from one computer to another?


message


package


packet


transmission

Answers

Answer:

Paquete de red o paquete de datos es cada uno de los bloques en que se divide la información para enviar, en el nivel de red. Por debajo del nivel de red se habla de trama de red, aunque el concepto es análogo. En todo sistema de comunicaciones resulta interesante dividir, la información a enviar, en bloques de un tamaño máximo conocido. Esto simplifica el control de la comunicación, las comprobaciones de errores, la gestión de los equipos de encaminamiento (routers), etcétera.

Al igual que las tramas, los paquetes pueden estar formados por una cabecera, una parte de datos y una cola. En la cabecera estarán los campos que pueda necesitar el protocolo de nivel de red; en la cola, si la hubiere, se ubica normalmente algún mecanismo de comprobación de errores.

Explanation:spero  teyaudee

Answer:

Packet

Explanation:

A data packet is the precisely formatted unit of data that travels from one computer to another.

(Confirmed on EDGE)

I hope this helped!

Good luck <3

The sales of last 6 months are stored in a list,
as follows
list1 = (12500, 35000, 12000, 40000, 55000,
60000]
How can you calculate the average sales?​

Answers

list1 = [12500, 35000, 12000, 40000, 55000,60000]

print(sum(list1)/len(list1))

We take the sum of all the elements in the list and divide the sum by the quantity of the elements. You can put however many elements in this list and you'll always get the average using the algorithm above.

HELP ASAP GIVING BRAINLIEST

Answers

Answer: top 4

Explanation:

Which of the following expressions shows the correct amount of sales tax for the computer at Store A? Select all that apply.
6%($1,200)
0.6($1,200)
0.06($1,200)
One-sixth($1,200)
StartFraction 3 over 50 EndFraction($1,200)

Answers

Answer:

6%($1,200)  0.06($1,200)  3/50($1,200)

Explanation:

hope this helps sorry if i am wrong

have a nice day

Answer:

a,c,e

Explanation:

it just makes sense U^U

A source mainly provides
from a text or piece of media.

Answers

Answer:

✔ information

A source mainly provides information from a text or piece of media.

Explanation:

because of edge

Answer:

Information is correct !!!!!!!!!!!!!!!!!!!!!!!!!!!!!1

Explanation:

May I have brainiest but its okay if not

how to boost audio live ​

Answers

Huh


Hzhanajsjjajajans

Which of the following would be used to communicate an idea or concept visually? podcast transcript building design speech
A.Podcast
B.Transcript
C.Building design
D.Speech

Answers

C, building design. Its the only visual one, the rest have to do with speaking/listening.

Answer:

C. building design

Explanation:

I did the test

Stay at least _____ behind the vehicle ahead of you at all times.
A. 3 seconds
B. 4 seconds
C. 3 car lengths
D. 4 car lengths

Answers

Answer:

B 4 seconds

Explanation:

You should stay 4 seconds away from a vehicle at all times at the same speed as the other vehicle or vehicles.

B
You should stay 4 seconds away from a car

The Home Tab is the first one in the Ribbon. True or False

Answers

Answer:True

Explanation:

Tormund wants to build a proxy firewall for his two computers, A and B. How can he build it?
A.
by connecting computer A with computer B and computer B to the proxy firewall
B.
by connecting a different firewall to each computer
C.
by connecting computer A to computer B through the proxy firewall
D.
by connecting only one of the computers to the firewall

Answers

Answer:

b

Explanation:

You have to match the letter nexts to the numbers

Answers

Answer:

Word is for business letter 4+a

2+c Monthly budget expenses

3+b is for presentation

1+d department store inventory

On Scratch (Picture above) ​

Answers

Answer:

see image below

Explanation:

This is a bit cumbersome, but it does the job. Not sure if it can be done much more efficiently. For these kind of operations, you'd be better off with a text based programming language.

PLEASE HELP asap 60 POINTS
needs to be in Java

A programmer has written a method called replaceLetter that counts the amount of times a letter is present in a word. Your job is to modify this existing method to fulfill a new purpose.

Rather than count the instances of a letter in a String, write a program that replaces all instance of one letter with another. You should directly modify replaceLetter to get this program to work. In the starter code, replaceLetter only has two parameter values. Your new version should have a third parameter to indicate which String value is replacing the existing letter.

For example,

replaceLetter("hello", "l", "y")
returns

"heyyo"
Sample output:

Enter your word:
hello

Enter the letter you want to replace:
l

Enter the replacing letter:
x
hexxo
Hint: The letters will be assigned from the user as String values. Make sure to use String methods to compare them!

Answers

import java.util.Scanner;

public class JavaApplication45 {

   public static String replaceLetter(String txt, String txt1, String txt2 ){

       char one = txt1.charAt(0);

       char two = txt2.charAt(0);

       String newTxt = "";

       for (int i = 0; i < txt.length(); i++){

           char c = txt.charAt(i);

           if (c == one){

               newTxt += two;

           }

           else{

               newTxt += c;

           }

       }

       return newTxt;

   }

   public static void main(String[] args) {

       Scanner scan = new Scanner(System.in);

       System.out.println("Enter your word:");

       String word = scan.nextLine();

       System.out.println("Enter the letter you want to replace:");

       String txt1 = scan.next();

       System.out.println("Enter the replacing letter:");

       String txt2 = scan.next();

       System.out.println(replaceLetter(word,txt1,txt2));

   }

   

}

I hope this helps!

PLS HURRY!!!
Look at the image below

Answers

Answer:

Explanation:

return value is the second one

function is third one

parameter is first one

Answer  ▪ return valuea value that can be passed from a function back to the calling part of a program.

Answer ▪ functiona group the instructions that can be used to organize a program or perform a repeated task.

Answer ▪ parametera value that can be passed to a function.

[SEE ATTACHED IMAGE]

Spymore

David wanted to build a Temple for God in________

A.) Hebron
B.) Bethlehem
C.) Jerusalem

Answers

Answer: The answer would be Bethlehem!

how to take a pic with a cumputer

Answers

Answer:

Ctrl+Shift+4

Explanation:

Answer:

Use Snip+Sketch on your taskbar

It looks like this~

The ability to understand a person's needs or intentions in the workplace is demonstrating
personnel
perception
speaking
listening

Answers

Answer:

perception i do believe is the answer

Linux is a powerful and free OS®️
-True
-False

Answers

Answer:

TRUEE

Explanation:

It’s is true that Linux is powerful and free

Does anyone have a leg pet on adopt me? Ty!

Answers

Answer:

no

Explanation:

I have a legendary pet in adopt me, these are the legendaries im TRADING:

frost furry, ride or fly kitsune, mega neon owl (Traded), and kangeroo (traded).

are you interseted in anything?

Sketch f(x) = 5x2 - 20 labelling any intercepts.​

Answers

Answer:

The graph of the function is attached below.The x-intercepts will be: (2, 0), (-2, 0)The y-intercept will be: (-20, 0)

Explanation:

Given the function

[tex]f\left(x\right)\:=\:5x^2-\:20[/tex]

As we know that the x-intercept(s) can be obtained by setting the value y=0

so

[tex]y=\:5x^2-\:20[/tex]

switching sides

[tex]5x^2-20=0[/tex]

Add 20 to both sides

[tex]5x^2-20+20=0+20[/tex]

[tex]5x^2=20[/tex]

Dividing both sides by 5

[tex]\frac{5x^2}{5}=\frac{20}{5}[/tex]

[tex]x^2=4[/tex]

[tex]\mathrm{For\:}x^2=f\left(a\right)\mathrm{\:the\:solutions\:are\:}x=\sqrt{f\left(a\right)},\:\:-\sqrt{f\left(a\right)}[/tex]

[tex]x=\sqrt{4},\:x=-\sqrt{4}[/tex]

[tex]x=2,\:x=-2[/tex]

so the x-intercepts will be: (2, 0), (-2, 0)

we also know that the y-intercept(s) can obtained by setting the value x=0

so

[tex]y=\:5(0)^2-\:20[/tex]

[tex]y=0-20[/tex]

[tex]y=-20[/tex]

so the y-intercept will be: (-20, 0)

From the attached figure, all the intercepts are labeled.

Which do you think is more important: Motorized vehicles like cars and airplanes or computers?

Answers

Answer:

I think computers are more important

Explanation:

The average person drives a vehicle to work to go and work on a computer.

how do we Rewrite the following Python code to avoid error. mark=inpt("enter your mark ")

Answers

Answer:

mark=input("enter your mark ")

Explanation:

the input method is used to get the input from the user.

when employees are hired, they agree to only use cel lphones during breaks. how would you classify this ?

Answers

Answer:

I would clasify that they do this so they can contact any family memebers.

Explanation:

If you're driving a car and know there's a motorcyclist around you, you should______. A. Not change your driving B. Check your blind spots frequently C. Remind them to wear a helmet D. Make wider turns than normal

Answers

b check your blind spots frequently i guess not sure

Select all the mistakes in the following: There may be more than one.

if (count = 10):
print ("Hello")
elseif (count > 100):
print ("Good-bye")
else
print("WAIT!")


If anyone knows the answer that would be greatly appreciated. Thanks

Answers

The if statement should have two equal signs, the elseif should be elif, and the else statement should have a colon at the end of it.  There might be more errors in the indentation but I cant know unless I see a picture of the problem. The print statement should be indented into the if, elif, and else statements.

1.What is the measurement unit of clock speed of computer​

Answers

Answer:

Hertz (Hz)

Explanation:

Simple Arithmetic Program
Using the instructions from Week 1 Lab, create a new folder named Project01. In this folder create a new class named Project01. This class must be in the default package. Make sure that in the comments at the top of the Java program you put your name and today's date using the format for Java comments given in the Week 1 Lab.
For this lab, you will write a Java program to prompt the user to enter two integers. Your program will display a series of arithmetic operations using those two integers. Create a new Java program named Project01.java for this problem.
Sample Output: This is a sample transcript of what your program should do. Items in bold are user input and should not be put on the screen by your program. Make sure your output looks EXACTLY like the output below, including spacing. Items in bold are elements input by the user, not hard-coded into the program.
Enter the first number: 12
Enter the second number: 3
12 + 3 = 15
12 - 3 = 9
12 * 3 = 36
12 / 3 = 4
12 % 3 = 0
The average of your two numbers is: 7
A second run of your program with different inputs might look like this:
Enter the first number: -4
Enter the second number: 3
-4 + 3 = -1
-4 - 3 = -7
-4 * 3 = -12
-4 / 3 = -1
-4 % 3 = -1
The average of your two numbers is: 0
HINT: You can start by retyping the code that was given to you in Exercise 3 of ClosedLab01. That code takes in a single number and performs a few arithmetic operations on it. How can you modify that code to take in two numbers? How can you modify it to display "number * number =" instead of "Your number squared is: "? Take it step by step and change one thing at a time.
You can use the following as a template to get you started. Note that you must create your class in the default package and your project must be named Project01.java for the autograder to be able to test it when you submit it.

Answers

Answer:

Written in Java

import java.util.*;

public class Project01{

public static void main(String[] args) {

 Scanner input = new Scanner(System.in);

 int num1,num2;

 System.out.print("Enter first number: ");

 num1 = input.nextInt();

 System.out.print("Enter second number: ");

 num2 = input.nextInt();

 System.out.println(num1+" + "+num2+" = "+(num1 + num2));

 System.out.println(num1+" - "+num2+" = "+(num1 - num2));

 System.out.println(num1+" * "+num2+" = "+(num1 * num2));

 System.out.println(num1+" / "+num2+" = "+(num1 / num2));  

 System.out.print("The average of your two numbers is: "+(num1 + num2)/2);

}

}

Explanation:

import java.util.*;

public class Project01 {

public static void main(String[] args) {

Scanner input = new Scanner(System.in);

This line declares myfirstnum and mysecnum as integer

 int myfirstnum,mysecnum;

This line prompts user for first number

 System.out.print("Enter first number: ");

This line gets user input

myfirstnum= input.nextInt();

This line prompts user for second number

 System.out.print("Enter second number: ");

This line gets user input

 mysecnum = input.nextInt();

This line calculates and prints addition operation

 System.out.println(myfirstnum+" + "+mysecnum+" = "+(myfirstnum + mysecnum));

This line calculates and prints subtraction operation

 System.out.println(myfirstnum+" - "+mysecnum+" = "+(myfirstnum - mysecnum));

This line calculates and prints multiplication operation

 System.out.println(myfirstnum+" * "+mysecnum+" = "+(myfirstnum * mysecnum));

This line calculates and prints division operation

 System.out.println(myfirstnum+" / "+mysecnum+" = "+(myfirstnum / mysecnum));  

This line calculates and prints the average of the two numbers

 System.out.print("The average of your two numbers is: "+(myfirstnum + mysecnum)/2);

}

}

Other Questions
AXYZ = AMNL.Triangle LNM Triangle _?_.ZYXXYZYXZOZXY The quotient of 38 times a number and -4 Hurry Please!!!The Tell-Tale HeartSuspense Elements: (below)Describes Characters anxiety or fearUses vivid words to describe dramatic sights/sounds, or feelingsRepeating words, phrases, or actions1st Person P-O-V (Unreliable Narrator)Foreshadowing(cues, hints, or predictions of future)Tell-Tale Heart (5-22)Examples from text orQuote (page #):The Outsider (CR 21-30)Examples from text orQuote (page #):Similarities & Differences Which of the following statements is a direct effect of the industrialization of the textile industry? a Demand for raw cotton and cheap/slave labor rose b Markets in India and China were opened to the Opium trade c Demand for fine cloth rose in the middle class d Factories were built near cotton plantations to reduce transport of raw materials 3. A wave is traveling with a period of 5 seconds. What is the frequency of the wave? Which of the following landforms is created by erosion?-Glacier Valleys-Hoodoos-Deltas-Morainesplease help me out owo how many squares do I have to draw in(10 x 10 grid) for the percentage of 57.74%?? A factory produces their product at a rate of 102 kg/hr. How many lb/day of the product are produces? (453.6 g = 1 lb) FUN FACT OF THE DAY (day:4)A baby fox is called a kitA baby alligator is called a hatchlingA baby armadillo is called a pupA baby fish is called a fry or fingerling What Aztec religious practice made them feared throughout Mesoamerica? What Spanish explorer brought an end to the Aztec empire? You have won the state lottery. There are two ways in which you can receive your prize. You can either have $1 million in cash now, or you can have $1.2 million that is paid out as follows: $300,000 now, $300,000 in one years time, $300,000 in two years time, and $300,000 in three years time. The interest rate is 20%. The present value of the payments over three years is: Which statement describes the contributions of Omar Khayyam?He was best known for his studies of Greek philosophy.He became well known as an architect. He was known for his poems about human existence and life.He became well known for writing The Thousand and One Nights. Explain why the members of the Pueblo culture built dwellings made of adobe. What is the slope of the line y = 3x + 5?-35-53 A carnival charges $5 to get in, plus $2 per ride. Which equation represents the relationship between the number of carnival rides a person rides x and the cost of attending the carnival y.x= 2x+5y= 2x-5y= 2x+5y= 5-2x So I have an essay assignment due Monday and I've done 4 rough drafts and had people read them and they've all been terrible. This is my last resort, is there anyone that could help me????? Hey! I will be putting lot of questions on my account for 10 points each so ik i need more than 10 so you can get 1 hundred points out of all my question combined so make sure to go to my accout and answer them all! Here is the first question! 4x+5x+1=0 solve using the quadratic formula 10. What is the best reason that press releases from a politician, or a government agency are notalways the best source of public information about an issue? The electron dot diagram shows the arrangement of dots without identifying the element.? with 2 dots above and 1 dot each right, below, left.Which elements symbol could replace the question mark in the diagram?boron (B)neon (Ne)rubidium (Rb)arsenic (As)