Answer:
see explaination for program code
Explanation:
scalar_product = 0
li=[]
li2=[]
#reading numbers1.txt and numbers2.txt intoli and li2 respectively
with open('numbers1.txt') as n1, open('numbers2.txt') as n2:
for line1 in n1:
li.append(int(line1))
for line2 in n2:
li2.append(int(line2))
#storing min list size into variable l
a=len(li)
b=len(li2)
if a<b:
l=a
else:
l=b
#calculating scalar product
for i in range(l):
scalar_product=scalar_product+li[i]*li2[i]
print("scalar product is",scalar_product)
Answer:
It assigns the two values in the initialization list to the first two elements and default values to the other elements.
Explanation:
Given
The array initialization
Required
Interpret the statement
double gallons[6] implies that the length/size of the array gallons is 6.
In other words, the array will hold 6 elements
{12.75, 14.87} implies that only the first two elements of the array are initialized
; the remain 4 elements will be set to default 0.
The professional choice of words for response is I wanted to help you protect my coworker’s privacy by letting you know I received this message intended for her.
Check more about writing below.
<h3>What is “Word Choice” in Writing? </h3>
'Word Choice” in writing is known to be a term that connote the ways or the usage of words that is said to be effective and precise use of language.
This is one that often conveys information and it also tends to enlighten the reader.
Note that option C is correct because it is best and most professional way to respond to a statement.
Hence, The professional choice of words for response is I wanted to help you protect my coworker’s privacy by letting you know I received this message intended for her.
Learn more about word choices from
brainly.com/question/1619714
#SPJ1
B. Online games are an influential medium.
Answer:
courseStudent.setName("Smith");
courseStudent.setAge(20);
courseStudent.setID(9999);
courseStudent.printAll();
System.out.print(", Id: " + courseStudent.getID());
Explanation:
This is the part of the code that needs to be added in order to print the output same as mentioned in the question. These lines should be added in the main method where solution is asked.