What is the difference between a loop and a function?

Answers

Answer 1
Big difference
Loops allow you to execute code multiple times while a condition is true
Functions allow you to “call” a snippet of code whenever you want, and you can pass it arguments that could affect the data it returns
Answer 2
Simple definition
A loop is a code that will repeat again and again until the condition is true. If the condition become false the loop will stop executing.

A function is a code that will do a particular task when you call it. First you need to define a function which is known as function definition. And whenever you want to use it then you have to call the function.
If you don’t call the function then it will not work what you want.

Hope you like this

Related Questions

The __________ process is designed to find and document vulnerabilities that may be present because there are misconfigured systems in use within the organization.

Answers

answer.

I don't know what it is

Which statement would cause polarization?
a.
"I miss you."
b. "I agree with you."
C.
"You never listen to me."
d. "Can I talk to you?"

Answers

C. “you never listen to me” would cause polarization

At the center of a star network is the _____, which manages the network and acts as a communications conduit for all network traffic.

Answers

Answer:

switch

Explanation:

At the center of a star network is the _____, which manages the network and acts as a communications conduit for all network traffic.

a. scale b. log c. portal d. switch

A:

d. switch

Which term refers to pretending to be a computer to work through lines of programming code?code blockingimportingdesk checkingsyntaxing

Answers

The computer programming that enables it to work with the line of programming code has been checking syntaxing.

What is computer programming?

The computer programming is given as the codes in the computer language for the operation of the task or the software program.

The line of programming for the code that enables the computer programming is checking syntaxing Thus, option C is correct.

Learn more about computer programming, here:

https://brainly.com/question/3397678

#SPJ1

Which software is used to play, create, and modify audio and video files?
software is used to play, create, and modify audio and video files.

Answers

Answer:

Adobe premiere pro, Maya.

Explanation:

There are many programs that do the following. I have listed two of the most well known softwares that can do this.

Eli has 7 games on his phone. His sister has 6 more than him. Which ratio compares the number of games on Eli’s phone to the number of games on his sister’s phone?
6:13
7:13
6:7
7:6

Answers

Answer:

7:13

Explanation:

First figure out how many his sister has so 6+7=13 so the ratio is 7:13 because of how its worded since it says Eli's games first then thats how you get 7 then his sisters 13 so final answer 7:13 There is you answer

Answer:

The answer would be 7:13.

Explanation:

Eli has seven games and his sister has 6 more than him, meaning 13. This in ratio form would be 7:13. Hope this helps! :)

In the following citation for a website, which detail is optional, according to
MLA style?
Manufacturers Association for Plastics Processors. Home page. Web. 6 Mar.
2014 .
A. Web.
B. 6 Mar. 2014.
C.
D. Home page

Answers

According to MLA style, the detail which is optional in the given citation for a website is: C. mapping link.

What is an information source?

An information source can be defined as a system or medium through which information, knowledge and ideas may be gotten (generated) and used by an individual.

What are citations?

Citations can be defined as references or links to all of the sources from which an author, writer, or researcher got his or her information from.

The characteristics of a MLA citation.

Generally, MLA citation often comprises the following information:

Author's last name and first name.Title of source.Title of container.Other contributors.VersionThe name of the publisher.Publication date.Location.

According to MLA style, the detail which is optional in the given citation for a website is mapping link.

Read more on citations here: https://brainly.com/question/8789070

#SPJ1

Complete Question:

In the following citation for a website, which detail is optional, according to

MLA style?

Manufacturers Association for Plastics Processors. Home page. Web. 6 Mar.

2014 .

A. Web.

B. 6 Mar. 2014.

C. Mapping link

D. Home page

___ is a type of social engineering where a hacker lures individuals into entering personal information into a website controlled by the hacker.

Answers

A type of social engineering where a hacker lures unsuspecting individuals to enter personal information into a website controlled by the hacker is phishing.

What is phishing?

Phishing can be defined as a type of social engineering (cyber attack) which involves making an attempt to obtain sensitive user informations, especially by disguising one's self as a trustworthy entity in an electronic communication, which is usually over the Internet.

This ultimately implies that, a type of social engineering where a hacker lures unsuspecting individuals to enter personal information such as usernames, passwords and credit card details or bank account details into a website controlled by the hacker is called phishing.

Read more on phishing here: https://brainly.com/question/23850673

#SPJ1

How to recover yahoo password without phone number and alternate email?.

Answers

You call support and if they can’t help then ur doomed

Being technologically literate requires being able to ______. a. use advanced graphics manipulation tools (adobe photoshop) b. use the most common operating systems (windows and apple os) c. adjust network settings for a company lan d. none of the above please select the best answer from the choices provided a b c d

Answers

Being technologically literate requires being able to use the most common operating systems (windows and apple). That is option B.

What are operating systems?

The operating systems are important software of a computer system which manages the computer's memory and other application software.

Examples of common operating systems include:

Apple operating system and

windows operating system

These operating systems are regularly updated by the technological companies that produced them. Therefore, being technologically literate requires being able to use the most common operating systems.

Learn more about  Operating System here:

https://brainly.com/question/22811693

Please help with this question in java.
Computers .​

Answers

Here is the program~

/*Pattern.Java.*/

import java.util.*;

public class Pattern_Prog

{

public static void main (String args[ ])

{

Scanner input = new Scanner(System.in);

int length;

System.out.print("Enter a word : ");

String word = input.next( );

length = word. length( );

for(int i = 0; i<= length; i++)

{

for(int j = 0; j<i; j++)

{

System.out.print(" ");

}

System.out.println(word.substring(0,length-i));

}

input.close( );

}

}

Hope it helps you!!

An information system’s _________ is the likelihood that the system or resource will be compromised by a ________ that will result in its ________ to further attacks.

Answers

Answer:

vulnerability      hack/unauthorized access    liklihood/predisposition

Explanation:

A machine learning cloud application provides meaningful data with the company's local customer information and purchase history. The company considers this data sensitive. How should the company manage this data when interfacing with the cloud service

Answers

Cloud storage is a service prototype that stores the data on remote storage sources generally on the net. The company can manage the data by keeping data on the local storage.

What is local storage and cloud storage?

Local storage is the storage place present in the system either in the hard drives or in the form of a solid-state drive (SSD). Cloud storage is the web storage platform that stores the data on the internet.

The cloud storage maintains, backs ups, and manages the files and folders stored on the cloud platform. Cloud storage is the virtual platform that is available to users based on the space needed.

Therefore, the data on local storage is managed when interfacing with the cloud system.

Learn more about cloud storage here:

https://brainly.com/question/17328624

#SPJ1

What is the purpose of the website for David and his friends, and why did they choose that type of website?

Dave and his friends create short films and a web series. They want to distribute their work online. Dave and his friends should set up

a(n)

website in order to generate

by providing users access to their content.

Answers

A website is a great way for Dave and his friends to distribute their short films and web series. It allows them to reach a wider audience and share their work with people all over the world. They can also use the website to promote their brand and generate income through advertising or merchandise sales.

What is the website about?

There are several different types of websites that Dave and his friends could choose from, depending on their goals and the features they want to include. One popular option is a video hosting platform, such as You Tube or Vimeo, which provides an easy way to upload and share video content.

Another option is a blog or portfolio website, which would allow them to showcase their work and write articles or blog posts about the creative process. They could even use a combination of both depending on the series and content.

Therefore, the type of website that Dave and his friends choose will depend on their goals and the features they want to include. They could consult a web developer to help them make the best choice for their needs.

Learn more about website  from

https://brainly.com/question/28431103

#SPJ1

In 2008, researchers at Princeton University demonstrated techniques to retrieve RAM contents after the computer had been powered off. They then extracted drive encryption keys from RAM and used them to decrypt an encrypted drive. This is called a(n):

Answers


It’s called a “Cold Boot” attack

A(n) _____ is an organization's management support system that combines many databases to improve management decision making. data mine information center data station data warehouse information network

Answers

A data warehouse is an organization's management support system that combines many databases to improve management decision making.

What is a management support system?

A decision support system, executive information system, as well as the knowledge-based or expert system functional capabilities are known to be factors that are all integrated into an  management support system.

Therefore saying that A data warehouse is an organization's management support system that combines many databases to improve management decision making is a true statement.

Learn more about management support system from

https://brainly.com/question/25491895
#SPJ1

Which button on a desktop computer begins a reboot of the computer without power being removed from the computer's components?

Answers

Answer:

1. Click the Start button in the lower-left corner of your screen. You can also press the Windows key on your keyboard to open the Start menu.

2. Choose the Power icon.

3. When you click the power button, you will have the option to put your computer to sleep, restart it, or power it down.

Explanation:

Have a good day

You’ve been hired to help a bank automate their deposit/withdrawal system! Your task is to write a Python program that interacts with a customer in order to process a deposit or withdrawal.

Assume the customer has an initial balance of $1000 (you should store the number 1000 in a variable). Then, ask the user two things:

Whether they want to make a deposit or withdrawal

For this step, they should type a deposit or withdrawal, depending on what they want to do. It needs to be the exact spelling, including capitalization!
How much money they want to deposit or withdraw

For this step, they should enter an integer.
Then, your program should use an if/elif/else statement to do the following:

If the customer is making a deposit, add the amount to their balance.
If the customer is making a withdrawal, subtract the amount from their balance.
If the customer typed something other than "deposit" or "withdrawal", print "Invalid transaction.".
In this case, the customer’s final balance is just the same as their initial balance.
Finally, your program should use an if/else statement to do the following:

If the customer’s final balance would be negative (less than zero), tell them "You cannot have a negative balance!".
Otherwise, report their final balance.
Here are some examples of what running your program should look like:

Example 1:

Deposit or withdrawal: withdrawal
Enter amount: 500
Final balance: 500

Example 2:

Deposit or withdrawal: withdrawal
Enter amount: 1500
You cannot have a negative balance!

Example 3:

Deposit or withdrawal: deposit
Enter amount: 500
Final balance: 1500

Answers

Answer: See below

Explanation:

Description: In this program, read-option from the user and based on that, perform the operation. And display the balance if the balance is negative.

transactions.py

balance = 1000

#read options from the user

option = input("Deposit or withdrawal: ")

amount = 0

#check if option is a withdrawal

if option == 'withdrawal':

amount = int(input("Enter an amount: "))

balance = balance - amount

#check option is deposit

elif option == 'deposit':

amount = int(input("Enter an amount: "))

balance = balance + amount

else:

print("Invalid transaction.")

#check balance is less than 0 (negative)

if balance < 0:

print("You cannot have a negative balance!")

else:

print("Final balance:",balance)

William would like to use full-disk encryption on his laptop. He is worried about slow performance, though, so he has requested that the laptop have an onboard hardware-based cryptographic processor. Based on this requirement, what should William ensure the laptop contains

Answers

There are different kinds of applications. William should ensure that the laptop contains TPM.

What is the TPM as seen in a computer?

This is known to be Trusted Platform Module and called TPM for short. It is a  technology that has been set up to aid or give a kind of hardware-based and also security linked services.

Note that A TPM chip is said to be often be a kind of secure crypto-processor and as such it will be the best for William's laptop.

See full question below

Question 33:William would like to use full-disk encryption on his laptop. He is worried about slow performance, though, so he has requested that the laptop have an onboard hardware-based cryptographic processor. Based on this requirement, what should William ensure the laptop contains? a) AESb) FDEc) PAMd) TPM

Learn more about laptop from

https://brainly.com/question/26021194

As a student you would most likely use the ________ collaboration tool set because it is free and takes not time to learn. Group of answer choices maximum

Answers

Collaboration toolsets are the programs and apps that make the work more effective and creative. Students should use a minimal collaboration toolset.

What is a minimal collaboration toolset?

A minimal collaboration toolset is a platform, application, or program that is free of cost and requires no time to learn. It is used in emails and other text platforms.

It shares content through email and shares document files. This minimal collaboration toolset uses all text but lacks voices and videos.

Therefore, the minimal collaboration toolset is the correct blank.

Learn more about the collaboration toolset here:

https://brainly.com/question/15176746

#SPJ1

A user calls to report that she’s unable to log on to e-mail, and you ask a couple of questions. Because you know that no one else is using the network right now, you can’t determine whether the problem is unique to her machine or affects the entire network. Probing further, you learn that she’s also unable to print. You decide this problem is probably easier to troubleshoot from the user’s computer. Using the eight-step problem-solving process, outline the items you must check and the questions you must ask when you arrive at the user’s office. B. Based on the possible responses to your questions, describe the actions you will take to correct potential causes of this problem

Answers

The outline of items that one must check is first to know or clarify the issue, break the issue down, etc.

What is troubleshooting?

This is known to be a step by step approach to problem handling that is often used to know and handle issues with systems etc.  

Others includes:

Set one's target in working on the issue, Analyze the main cause, Develop any form of Countermeasures.Then you Implement the Countermeasures made Monitor the Results that was givenGo through the Process to Standardize it and tell the user that it is solved.

Conclusively, By following the steps, one can know the issue and solve it.

Learn more about troubleshoot from

https://brainly.com/question/14394407

What is your most valued item you have in your house or apartment?

Answers

Answer:

my book collection and nintendo

Explanation:

The questions of economics address which of the following? Choose three answers.
who
what
where
when
why
how

Answers

Answer:

Economists address these three questions: (1) What goods and services should be produced to meet consumer needs? (2) How should they be produced, and who should produce them? (3) Who should receive goods and services? The answers to these questions depend on a country's economic system.

So the answer would be WHAT, WHY & WHO. Hope this helps

Explanation:

A(n) __________ is a common list operation used in programming. Its purpose is to iterate through a list of items, one item at a time, and check each one to see if it has exactly what we are looking for.

Answers

Linear search

You implement this algorithm by iterating over each item, and checking if the item matches what you are searching for.

It is linear because it takes a linear amount of time to search for an item.

Terry is a drafting technician who designs electronic designs. He uses software to design these design. Which file format does he use to save these drawings?
A. music file format
B. e-book file format
C. image file format
D. CAD file format

Answers

Answer:

D. CAD file format

Explanation:

Lab 8-1: Working with Boot Loader and Runlevels what is the root password

Answers

The root account on a Linux or Unix Operating System is the account with the most advanced privileges. The password to this account is called the "Root Password"

What is a bootloader?

The first thing that happens when the computer is powered on is that very important software is triggered. It is this software that helps the operating system (OS) to boot or load. This piece of software is called the bootloader.

By default, Unix OS does not have a root password. This must be set by the user. However, if this has been set and was lost, it may be reset using the following steps:

Boot to Recovery ModeDrop out to Root SheetRemount the File System with Write Permissionshere, type exactly the following command: mount -o rw,remount /Press "Enter" At this point, you should be able to make changes to the data on the hard drive. Next, enter passwd usernameretype the password and user name to confirm, thentype shutdown -r to restart the system.

Learn more about root passwords at:

https://brainly.com/question/26617114

it's 'p' at sign 'ssw0rd

When was the first analog device, the phonautograph, launched?
The phonautograph was the first analog device; it launched in _____
.

Answers

Answer:

1860

Explanation:

What is output by the following code?

for x in range (4):
for y in range (3):
print("*", end=" ")
print("")
Group of answer choices

* * * *
* * * *
* * * *
* * * *
* * * *

* * *
* * *
* * *
* * *

* * * * *
* * * * *
* * * * *
* * * * *

* * * *
* * * *
* * * *

Answers

Answer:

* * *

* * *

* * *

* * *

Explanation:

The inner loop will print 3 times *

For every outer loop, that 3 times * will be printed again => 4 times in this case

The end=" " is to add new line in each inner loop

Typically, hybrid drives use SSD to store the operating system and applications and hard disks to store videos, music, and documents.

A. True

B. False

Answers

Answer:

False

Explanation:

SSD's aren't as reliable as traditional hard disks, therefore, if the operating system is installed on the SSD and is stops working, the whole computer is broken.

which of the following is a benifit of googling yourself ?

Answers

Answer:

you are protecting yourself from identity theft

Other Questions
A coil of wire with 226 circular turns of radius 3.20 cm is in a uniform magnetic field along the axis of the coil. The coil has R = 42.4 At what rate, in teslas per second, must the magnetic field be changing to induce a current of 0.155 A in the coil? View Juan's schedule.Horario Escolar -- Estudiante: Manuel Ortegahora clase profesor sala de clase7:50 Ingls Sr. Rivera 28:55 Educacin Fsica Sr. Banderas 4510:00 Historia Sra. Lpez 1811:10 Almuerzo cafetera11:50 Ciencias Srta. Coln 112:55 Matemticas Sr. Garza 10Write five sentences about when Juan's classes occur. Don't forget to write the times out in word form. Find dy/dx (the derivative ) of f(x) = 4x2 using limits definition of the derivitive (of limit of the DQ when h> 0Formulas neededa) Equation of a line in slopeyintercept form y = f(x) = mx + bb) Equation of a line slopepoint y y1 = m (x x1) What impact Mary surratts gender had on her trial The US Environmental Protection Agency issues a daily report for pollution levels called the __________. A.Pollution Advisory WarningB.Air Rating LevelC.Particulates and Pollution IndexD.Air Quality Index Use a net to find the surface area of the prism. Describe the pattern in the sequence. Find the next two terms of the difference. Show work-2, -5, -8, -11, ... 50 POINTS EACH!On a 23 question test, I got 6 wrong. What is percent did I get right? (On 100 percent scale) What is the slope of the line shown above? Please Help fast! (not rushing ya'll and, this is not high school math) I WILL GIVE 20 POINTS TO THOSE WHO ANSWER THIS QUESTION RIGHT NOOOO SCAMS PLEASE AND PLEASE EXPLAIN WHY THAT IS THE ANSWER What is actin? And how does it help in cytokinesis? In which type of circuit can you find total resistance by adding all of the individual resistances? .lWhich of the following is an example of dynamic striking?a. billards (pool)b. golfc. tennisd. bowling The circumference of a globe is 16pi inches. what is the volume of the globe? show your work. use 3.14 for pi Describe a real-life situation that you can represent with an inequality. I log 25 - 2log 3 2 - 2log3 + log 18 10 x/(x ^ 2 + 2xy + y ^ 2) + y/(x ^ 2 - y ^ 2) ?QuestionType your response in the box.List three effects of slavery in Africa. 6. Which word applies when we receive a compliment and we give a compliment in return?a. punctuateb. flauntc. reciprocated. initiate