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
Ivahew [28]
3 years ago
7

8.6 Code Practice: Question 2

Computers and Technology
1 answer:
Rina8888 [55]3 years ago
4 0

Answer:

import random

def buildArray(a, n):

   for i in range (n):

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

     

arr = []

def sumArray(a):

   tot = 0

   for i in range(len(a)):

       tot = tot + a [i]

   return tot

       

   

arr = []

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

buildArray(arr, numbers)

print(arr)

print("Total " + str(sumArray(arr)) )

Explanation:

You might be interested in
You use the _____ sheet in the format cells dialog box to position data in a cell by centering it, for example.​
Oliga [24]
You use the Alignment sheet in the format cells dialog box to position data in a cell by centering it, for example. Generally along the middle branch is a line or centerline of the definite pipeline on a scale of whatever is indicated.
3 0
3 years ago
Hi there! I just started my beginner computer science class and I was wondering if anyone wants to help with an assignment i'm h
Alik [6]

After looking at your question, I reasoned you were writing this in python. Here's my code, I hope it helps!

while True:

   v1 = input("Enter value of first variable (T/F) ")

   v2 = input("Enter value of second variable (T/F) ")

   v3 = input("Enter value of third variable (T/F) ")

   print("v1: {}, v2: {}, v3: {} = T".format(v1, v2, v3) if v1 == "T" and v2 == "T" or v1 == "T" and v3 == "T" else "v1: {}, v2: {}, v3: {} = F".format(v1, v2, v3))

5 0
3 years ago
What will be the biased exponent of 1,100.1? <br> A:130<br> B:127<br> C:-127<br> D:2^3
telo118 [61]
D. 2^3 is correct

hope this helps

7 0
4 years ago
Read 2 more answers
Is the number of hits to a website in a daynumber of hits to a website in a day a discrete random​ variable, a continuous random
marissa [1.9K]

Answer:

The correct answer to the following question will be "It is a discrete random variable".

Explanation:

A variable that assumes algebraic expressions defined by a randomized occurrence result, is a Random variable.

  • There are several potential or possible values for a single randomized variable.
  • A discrete random variable's chances for each value is between 0 (zero) and 1 (One), as well as the total amount among all possible outcomes, is equitable to 1.

So, a Discrete random variable is the right answer.

3 0
3 years ago
Read 2 more answers
Which step in the software development life cycle involves making improvements based on user feedback?
BigorU [14]

Answer:

Design Phase

Explanation:

In design phase developers make prototypes. The prototype is the solution without actual implementation. That prototype is shown to the user for the purpose of getting feedback. So design phase of SDLC involves making improvements based on user feedback.

3 0
3 years ago
Read 2 more answers
Other questions:
  • You disassemble and reassemble a desktop computer. when you first turn it on, you see no lights and hear no sounds. nothing appe
    11·2 answers
  • Write a function max arguments. write a program that reads three floating-point numbers, uses the max function, and displays the
    5·1 answer
  • How many seconds are required to make a left turn and join traffic?​
    11·2 answers
  • Write a program that lets a maker of chips and salsa keep track of their sales for five different types of salsa they produce: mi
    8·1 answer
  • An electronic braille embosser that translates text from a braille keyboard to a printer:
    10·1 answer
  • The function below takes a string argument sentence. Complete the function to return the second word of the sentence. You can as
    5·1 answer
  • Why when I move stuff in Roblox Studio like an object or a Character. It tilts the opposite direction I'm moving it to with the
    6·2 answers
  • Which of the following should you do if your accelerator is stuck? A. Pump your brakes to build fluid pressure. B. Shift to Neut
    14·2 answers
  • 236. A system such as a printer, smart TV, or HVAC controller, typically uses an operating system on what is called a:
    13·2 answers
  • The features used be of Computer that tell, it every field.​
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!