Answer:
Explanation:
The following code is written in Java, the function takes in a list with the previous day's values. The function then uses that list, loops through it and multiplies each individual value by 2 and returns the modified list. The first red square represents the test case for the function, while the second red square in the image represents the output.
public static ArrayList<Integer> doubleIt(ArrayList<Integer> mylist) {
for (int x = 0; x<mylist.size(); x++) {
mylist.set(x, mylist.get(x)*2);
}
return mylist;
}
Using the computer language in python to write a function code that personalized house signs
<h3>Writting the code in python:</h3>
<em>#Assign varibles</em>
<em>charge = 0.00</em>
<em>numChars = 8</em>
<em>color = "gold"</em>
<em>woodType = "oak"</em>
<em />
<em>#Checking for number of characters</em>
<em>if numChars > 5:</em>
<em>charge = 35 + (numChars-5)*4</em>
<em>elif numChars > 0:</em>
<em>charge = 35</em>
<em />
<em>#Checking wood type</em>
<em>if woodType == "oak":</em>
<em>charge += 20</em>
<em />
<em>#Checking for color</em>
<em>if color == "gold":</em>
<em>charge += 15</em>
<em />
<em>#Print output</em>
<em>print("The charge for this sign is $"+str(charge)+".")</em>
See more about python at brainly.com/question/13437928
#SPJ1
There are multiple devices that emit radio waves. The most obvious is are radiod and microwaves (yes, the food cooker). Wireless applicances also emit radio waves. But don't confuse everything to use microwaves. Some applicances use frequencies instead of radio waves. Some applicances that use frequencies are toy control remotes and a garage door.
I hope this helps! Please make sure ask me if you need more clarity!
Here is an HTML example with the CSS class defined inline:
<!doctype html>
<html>
<head>
<style>
.YellowBackground {
background-color : yellow;
}
</style>
</head>
<body class="YellowBackground">
<h1>A yellow background</h1>
</body>
</html>
Answer:
a variable of type "double" is more suitable for finding average because average could be any number with decimal places. we can't use a variable of type "integer" because it will omit the value after the decimal and will not produce satisfactory results.
Explanation:
an example of C++ code is given to find the average of two numbers a and b
#include <iostream>;
using namespace std;
int main() {
double a = 2.334;
double b = 34;
double average = (a + b) / 2;
cout << average;
return 0;
}