Answer:
Cyberbullying is the use of digital-communication tools (such as the Internet and cell phones) to make another person feel angry, sad, or scared, usually again and again.
Answer:
The correct option is option 3 which is The code segment works as intended but only when the sum of the three lengths is an integer or the decimal part of the sum of the three lengths is greater than or equal to 0.5.
Explanation:
As the variable minLength is defined as an integer thus the value is being truncated although the value of 0.5 is being added however if the decimal portion of the length is less than 0.5, the portion is truncated.
Answer: c++
int fibonacci(int n) {
if (n < 0) {
return -1;
} else if (n == 0 || n == 1) {
return n;
} else {
return fibonacci(n - 1) + fibonacci(n - 2);
}
}
int main() {
int i;
for (i = 0; i < 20; i++) {
cout << fibonacci(i) << " ";
}
}
Explanation:
this is fibonacci
Answer:
What is the question here? lol
Explanation:
Answer:
Here is the Python program:
stock_prices = input().split() #to take input and splits it into a list
for price in stock_prices: #iterates through stock_prices
print("$",price) #prints each value of stock_prices with a dollar sign
Explanation:
The program is well explained in the attached comments. I will explain the logic of the program with the help of an example:
Suppose the user enters the following input as stock_prices values
34.62 76.30 85.05
input() method is used to take input from user
split() method is used to split or break this input string and returns a list of strings as:
['34.62', '76.30', '85.05']
Now the statement for price in stock_prices: iterates through each item of the list and print("$",price) prints each value of list with a dollar sign on the output screen as:
$ 34.62
$ 76.30
$ 85.05