Hey!
---------------------------------------------------
Definition:
A "for loop" is something used for repeating things over a list of items. For instance, a list or a dictionary.
Code:
colors = ["red", "green", "blue"]
for x in colors:
print(x)
---------------------------------------------------
Definition:
A "while loop" is is something used for carrying out a set of lines that are true.
Code:
n = 1
while i < 4:
print(n)
n += 1
---------------------------------------------------
Real-Life Example:
A real-life example would if I was a manager or boss for a company say that everyone was off a certain day. Like, if I said everyone was off for Christmas the 25th. If I had 1000 employees that would take a very long time to send an email to everyone. Instead of sending an email to everyone I can program code that uses "for loops" and "while loops" to create a message and send it to everyone.
---------------------------------------------------
Hope This Helped! Good Luck!
Answer:
i would suggest not opening ones that start with bit . ly
Explanation:
pls mark brainliest
Answer:
B. Assign roles and privileges to users so that only job-relevant data is accessible to the user.
Explanation:
Certain departments will require certain information for certain processes. It is not recommendable for every user to access every information of the company as it may reveal vital information.
Hence, every role and department should be given certain privileges to information according to the tasks and needs of the role.
Answer:
Alternative Press just differs in opinion from mainstream media. A tabloid is literally smaller and is contains sensationalist and largely photographic content.
Most alternative presses aren't reliable and are effectively tabloids in nature, but their content differs.
Answer:
#!/bin/bash
function number_div( ) {
for i in {0. .100};
do
if (( $i % 3 == 0 ))
then
echo $i
elif (( $i % 5 == 0 ))
then
echo $i
else
echo "Number not divisible by 3 and 5"
fi;
done
}
number_div( )
Explanation:
The bash script is saved as "HW4p2.sh" and executed as "./HW4p2.sh". This code would print all and only numbers divisible by 3 or 5.