ANSWER QUICK 50 POINTS
You have the following code in your program.

from array import *
Which line of code would create an array?


D = array([2.5, 3, 7.4])

D = array('f',[2.5, 3, 7.4])

D = array['f',[2.5, 3, 7.4]]

D = array('f',2.5, 3, 7.4)

Answers

Answer 1

Answer:

D = array('f',[2.5, 3, 7.4])

Explanation:

is the answer

Answer 2

A variable must be declared with an array type before the array itself can be created. Array types resemble other Java types, with the exception that square brackets are placed after them ( [] ). Thus, option D is correct.

What line of code would create an array?

Using the NumPy library, new data types known as arrays can be produced in Python. NumPy arrays are created for numerical studies and only contain one data type.To build an array, use the array() method after importing NumPy. The input for the array() function is a list.

An array, also known as a database system, is a group of things or data that is held in a contiguous memory area in coding and programming. Several instances of the same kind of data are grouped together in an array.

Therefore, D = array('f',2.5, 3, 7.4)  line of code would create an array.

Learn more about array here:

https://brainly.com/question/22296007

#SPJ2


Related Questions

Which of the following statements demonstrates the consequence of segregated medical
care?
A. Inequitable access to education and funding for Black doctors
B. Fewer predominately white medical schools being open to Black students
C. Both A and B
D. Neither A nor B

Answers

Answer:

C. Both A and B

Explanation:

Not only is inequitable access to education and funding for Black doctors a consequence of segregated medical care, it also resulted in less predominately white medical schools allowing Black students.

The statements that demonstrate the consequence of segregated medical care are both statements A and B. The correct option is C.

What is segregated medical care?

To distinguish or put apart from others or the general population. Segregated medical care has led to Black students being accepted into less primarily white medical institutions, which has resulted in unequal access to education and funding for Black professionals.

Black doctors have unequal access to education and funding. Less predominantly white medical colleges accept students of color.

Medical discrimination, racialized socioeconomic deprivation, and a segregated healthcare system all contribute to drastically different experiences in care for Black and White patients.

Therefore, the correct option is C. Both A and B.

To learn more about segregated medical care, refer to the link:

https://brainly.com/question/10812745

#SPJ6

Why were low quality video so often use when Internet connection we’re poorer than they are today

Answers

What do you mean? I’m confused with the question, it doesn’t make sense:)

Answer:

The answer is C. "High-quality videos took too long to transfer" in Fundamentals of Digital Media.

what is volitile memory?

Answers

Answer:

do you mean volatile? Volatile memory is a type of storage whose contents are erased when the system's power is turned off or interrupted.

Explanation:

hope this helps have a good rest of your day :) ❤

use a for loop to create a random forest model for each value of n estimators from 1 to 30;
• evaluate each model on both the training and validation sets using MAE;
• visualize the results by creating a plot of n estimators vs MAE for both the training and validation sets
After that you should answer the following questions:
• Which value of n estimators gives the best results?
• Explain how you decided that this value for n estimators gave the best results:
Why is the plot you created above not smooth?
• Was the result here better than the result of Part 1? Wha: % better or worse was it? in python

Answers

Answer:

nvndknnnnnnngjf

Explanation:

f4tyt5erfhhfr

Pls help I will get points and brainliest

Answers

Answer:

They are both types of interfaces.

Explanation:

Click the answer that includes the word "Interface" or "Interfaces"

Which of the following make up atoms? A. weight, mass, and gravity B. protons, electrons, and neutrons C. elements, compounds, and molecules D. matter, non-matter, and air pressure

Answers

Answer:

B

Explanation:

protons, electrons and neutrons

what do the three dots : . seen in equations/proof mean

Answers

the three dots usually means “therefore”

Pls help will mark brainliest as soon as u awnser

Answers

Answer:

The answer is...

Explanation:

It is A or D I would go with D tho

Hope this helped

:)

During early recording, microphones picked up sound waves and turned them into electrical signals that carved a _______ into the vinyl. (6 letters)

WILL PICK YOU AS BRAINLIEST!


hint- NOT journalism

HURRY please

Answers

Answer:

Groove

Explanation:

There is not much to explain

In a program, write a method that accepts two arguments: an array of integers and a number n. The method should print all of the numbers in the array that are greater than the number n (in the order that they appear in the array, each on their own line).
In the same file, create a main method and call your function using the following data sets:
The array {1, 5, 10, 2, 4, -3, 6} and the number 3.
The array {10, 12, 15, 24} and the number 12.
My code:
public class LargerThanN
{
public static void print(int[] array,int n)
{
for(int i=0; i {
if (array[i]>n)
System.out.println(array[i]);
}
System.out.println();
}
public static void main(String[] args)
{
int[] array1 = {1,5,10,2,4,-3,6};
int num1=3;
print(array1,num1);
int[] array2 = {10, 12, 15, 24};
int num2 = 12;
print(array2, num2);
}
}
My programming lab does not want extra lines between the output. What am I doing wrong? How do I fix it?

Failed Test Run
The contents of your standard output is incorrect.
Attention: the difference between your stdout and the expected stdout is just a question of spacing.
Standard Output Hide Invisibles
Your Code's Actual Result:
Expected Result: 5
5 10
10 4
4 6
6
15 15
24 24

Answers

Answer:

move the System.out.println(); outside the for loop.

Explanation:

see picture. I shortened the main() method a bit, for fun.

Write a program that calculates the area & perimeter of a rectangle, where
the values for width and length are given by the users.

Answers

Answer:

In Python:

Length = float(input("Length: "))

Width = float(input("Width: "))

Area = Length * Width

Perimeter = 2*(Length + Width)

print(Area)

print(Perimeter)

Explanation:

This gets the length from the user

Length = float(input("Length: "))

This gets the width from the user

Width = float(input("Width: "))

This calculates the area

Area = Length * Width

This calculates the perimeter

Perimeter = 2*(Length + Width)

This prints the area

print(Area)

This prints the perimeter

print(Perimeter)

Find the unknown quantities

Answers

Answer:

I = 11/2 = 5.5

R = 60/11 ≈ 5.5Ω

Explanation:

You use V = I·R twice.

Entire circuit: 140 = I·(20+R)

Resistor: 30 = I·R

Solving this system of equations gives:

140 = I·(20+R) = 20I + IR

30 = I·R

140 = 20I + 30

20I = 110

I = 11/2 = 5.5

R = 60/11 ≈ 5.5Ω

what are the pros and Con's of human -computer interaction?​

Answers

Answer:

pros-you can talk to a man made intelligence without the drama except for system crashes lol

-you can have them as a romantic partner.

cons-there are programmed emotions so it isn’t that real.

romantic emotion can be fake.

Explanation:

In this exercise we will practice using loops to handle collections/containers. Your job is to write a program that asks the user to enter a sentence, then it counts and displays the occurrence of each letter.
Note: your program should count the letters without regard to case. For example, A and a are counted as the same.
Here is a sample run:
Enter a sentence: It's a very nice day today!
a: 3 times
c: 1 times
d: 2 times
e: 2 times
i: 2 times
n: 1 times
o: 1 times
r: 1 times
s: 1 times
t: 2 times
v: 1 times
y: 3 times
Notes:
The purpose of this problem is to practice using loops and collections/containers/strings.
Please make sure to submit a well-written program. Good identifier names, useful comments, and spacing will be some of the criteria that will be used when grading this assignment.
This assignment can be and must be solved using only the materials that have been discussed in class: loops, the index system, strings, lists and/or dictionaries. Do not look for or use alternative methods that have not been covered as part of this course.
How your program will be graded:
correctness: the program performs calculations correctly: 40%
complies with requirements (it properly uses loops, and containers/strings): 40%
code style: good variable names, comments, proper indentation and spacing : 20%
Language is python 3

Answers

Answer:

In Python:

chars = 'abcdefghijklmnopqrstuvwxyz'

letter = input("Sentence: ")

for i in range(len(chars)):

   count = 0

   for j in range(len(letter)):

       if chars[i] == letter[j].lower():

           count = count + 1

   if count > 0 :

       print(chars[i]+": "+str(count)+" times")

Explanation:

This initializes the characters of alphabet from a-z

chars = 'abcdefghijklmnopqrstuvwxyz'

This prompts the user for sentence

letter = input("Sentence: ")

This iterates through the initialized characters

for i in range(len(chars)):

This initializes count to 0

   count = 0

This iterates through the input sentence

   for j in range(len(letter)):

This compares the characters of the sentence with alphabet a-z

       if chars[i] == letter[j].lower():

If there is a match, count is incremented by 1

           count = count + 1

If there is an occurrence of character,

   if count > 0 :

The character and its count is printed

       print(chars[i]+": "+str(count)+" times")

In this exercise we have to use the knowledge of computational language in Python, so we have that code is:

It can be found in the attached image.

So, to make it easier, the code in Python can be found below:

chars = 'abcdefghijklmnopqrstuvwxyz'

letter = input("Sentence: ")

for i in range(len(chars)):

  count = 0

  for j in range(len(letter)):

      if chars[i] == letter[j].lower():

          count = count + 1

  if count > 0 :

      print(chars[i]+": "+str(count)+" times")

See more about python at brainly.com/question/26104476

A switch on a circuit board can be in two states what are they​

Answers

Answer:

on and off

Explanation:

What is the only language that a computer can understand

Answers

Answer: Low-Level language is the only language which can be understood by the computer. Low-level language is also known as Machine Language. The machine language contains only two symbols 1 & 0. All the instructions of machine language are written in the form of binary numbers 1's & 0's.

Explanation:

Answer:

Machine Language (low level language)

Low-Level language is the only language which can be understood by the computer. Low-level language is also known as Machine Language. The machine language contains only two symbols 1 & 0. All the instructions of machine language are written in the form of binary numbers 1's & 0's.

Other Questions
please help, 5 pnts . How us Gary a threat to Franks status in school what impact would a loss of the top soil have on soil? ill give brainliest 5 stars and thank you Please help! Which of the following statements about the points (-1, -3) and (1, -3) istrue?A. (-1,-3) and (1, -3) are reflections of each other over the x-axis.O B. (-1, -3) and (1, -3) are reflections of each other over both axes.O C. (-1,-3) and (1, -3) are both on the x-axis.O D. (-1,-3) and (1, -3) are reflections of each other over the y-axis. L>>Which difference between Huck Finn and Tom Sawyer is most essential for readers to understand when analyzing howtheir interactions affect the plot in The Adventures of Huckleberry Finn?Huck Finn responds to life from a perspective of poverty while Tom Sawyer reacts with expectations of middle class entitlementHuck Finn is indifferent about joining in with friends' pursuits while Tom Sawyer enacts romantic fantasies about chivalry at everyopportunityHuck Finn sees adventures as problems to be solved while Tom Sawyer treats them like familiar childhood stories.Huck Finn plays hooky because it is acceptable in his family while Tom Sawyer rebels against his family's respectability.NEXT QUESTIONASK FOR HELPTURN IT What is 3/4 - 1/3 ?? I love you. :3is true. Can someone help please? help pleaseeeeeeeeeeeeeeeeeee brainliest will be coming to you I WILL MARK BRAINLIESTThe_______ allowed farmers to plow fields using horses. (heavy plow/horse collar) write a diary entry on your feelings the evening before you are get your school report day. Please answer properly! Its due today, Ill give brainliest if the answer is correct!2-3 sentence only, thank you in advance!1. Do you favor the idea of celebrating weddings in an elaborate way, often lasting for some days and even inviting people you dont even know? Why or why not?2. What do you think about arranged marriages? What is your thought on the Indian act? MATH HELP!!! MARKING BRAILIESTT >> how did the truman doctrine mark the formal declaration of the cold war? If the mass of the products of a chemical reaction was 100 g, what wasthe mass of the reactants? Explain. - PLEASE HELP MEI need to write at least 10 sentences about this topic; Imagine you are an american soldier fighting in the Mexican American War. What is your average day like? What do you see and how do you feel? ILL GIVE THE BRAINEST Why do you think the slaves were able to successfully fight for theirfreedom even though they were given so little power in Haiti? * Select the italicized word that is not capitalized correctly.The Labor day holiday begins the fall season for our family.A .dayB.holiday c.fallD.family please help! 1. at what time was the car stopped?2. at what time did the car have the greatest velocity?3. what was the greatest velocity ?4. at what time was the car accelerating?5. how fast was the car going at 1.0h?6. qwhat is the acceleration at 0.9 hr?