Answer:
The solution code is written in Python.
- def mult2_diff(lst):
- num_list = []
-
- for x in lst:
- num_list.append(x * 2)
-
- diff = num_list[0]
- for i in range(1, len(num_list)):
- diff = diff - num_list[i]
-
- print(diff)
Explanation:
Firstly, based on the requirement stated in the question, define a function <em>mult2_diff() </em>that takes one argument, <em>lst</em>, which is a list of numbers (Line 1).
This function is expected to multiply each number in the list by two and then followed with computing the difference. To do so, let's try to attempt the first function task, multiplying numbers. Create a new list, num_list, to hold the multiplied numbers (Line 2). Use a for loop to traverse through each number in the input list, <em>lst</em>, and multiply each of them by two and add it to the <em>num_list </em>(Line 4-5).
To attempt the second function task, create another variable, <em>diff</em>, to hold the value of calculated difference between the numbers in the <em>num_list</em>. Initialize <em>diff </em>with the first number in the <em>num_list</em>. Use a another for-loop to traverse through each number in the num_list starting with second index, <em>1</em>, and calculate the difference between the <em>diff </em>and the current number extracted from the <em>num_list </em>through indexing.
At last print the output of <em>diff</em> (Line 11).
Answer:
A camera phone is a mobile phone which is able to capture photographs and often record video using one or more built-in digital cameras. It can also send the resulting image over the telephone function. The first commercial camera phone was the Kyocera Visual Phone VP-210, released in Japan in May 1999.
Explanation:
Hope this kinda helps you :)
Answer:
This will work for most languages, but this is mainly for c#. Double check what language your using before putting in this answer.
Console.WriteLine("What grade are you in?");
int grade = Convert.ToInt32(Console.ReadLine());
if (grade == 9)
{
Console.WriteLine("Freshman");
}
if (grade == 10)
{
Console.WriteLine("Sophomore");
}
if (grade == 11)
{
Console.WriteLine("Junior");
}
if (grade == 12)
{
Console.WriteLine("Senior");
}
if (grade < 8)
{
Console.WriteLine("Not in High School");
}
Explanation:
The first line asks what grade are you in, then when the user types in the grade it saves it in a variable. We then use that variable for the conditionals. The conditional states, whatever grade level your in, it prints your high school year title. If anything is lower than 8, it will print not in high school.
Answer:
Brenda works for the IRS reviewing paperwork.
Jenny reviews buildings to determine how much money they are worth
Kareem advises businesses to make sure they handle their finances correctly.
Explanation:
Answer:
I think you should do what are passionate about. therefore it might gain more followers. Also so it's not boring and it's enjoyable for you. also it will be easier for you to do. the pros are you will put in extra efforts, it will make you happy, it will workout longer, it can help you grow as a person. the cons are you may lose followers, it may be hard to think of content, you might not make money, people may try to bring you down.
i think you should make a different account and try it. either make another account for art or make another for vlogs.
But honestly just try it out and see how it goes.
Explanation: