1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
natita [175]
3 years ago
12

When do you use a for loop?

Computers and Technology
2 answers:
AleksandrR [38]3 years ago
6 0

Answer:

You use a for loop when you know how many times you want to run the loop

Explanation:

if you dont know, use a while loop

ale4655 [162]3 years ago
5 0

Answer: You   tube Videos. (if you wanna repeat the video)

Explanation:

You might be interested in
30points for help
stealth61 [152]

Answer:

blank 4

Explanation:

I just did this assignment got 100

4 0
3 years ago
Write a program that defines an interface having the following methods: addition, subtraction, multiplication, and division. Cre
Tatiana [17]

Hello, you haven't provided the programing language in which you need the code, I'll explain how to do it using Python, and you can follow the same logic to make a program in the programing language that you need.

Answer:

1. # -*- coding: utf-8 -*-

2. #Python  

3. class Calculator:

4.     def add(self):

5.         print(a + b)

6.     def sub(self):

7.         print(a - b)

8.     def mul(self):

9.         print(a * b)

10.     def div(self):

11.         print(a / b)

12.  

13. obj = Calculator()

14. choice = 1

15. while choice != 0:

16.     a = int(input("\nEnter first number: "))

17.     b = int(input("Enter first number: "))

18.      

19.     print("\n0. EXIT")

20.     print("1. DIVISION")

21.     print("2. ADDITION")

22.     print("3. SUBTRACTION")

23.     print("4. MULTIPLICATION")

24.      

25.     choice = int(input("\nEnter your choice: "))

26.     if choice == 1:

27.         obj.div()

28.     elif choice == 2:

29.         obj.add()

30.     elif choice == 3:

31.         obj.sub()

32.     elif choice == 4:

33.         obj.mul()

34.     else:

35.         break

Explanation:

  • From lines 1 to 12 we define the object with four methods, addition, subtraction, multiplication, and division. Each method contains the operation between two variables inside a print function
  • On line 13 we instantiate our class
  • On line 14 we declare the variable choice that is going to store the operation that the user wants to perform
  • On line 15 we declare a while loop, this is going to keep running the program until the user wants to exit
  • From line 16 to 18 we ask the user to enter two numbers
  • From line 19 to 24 we print the possible operation, assigning a number for each operation, this indicates to the user what number to press for what operation
  • On line 25 we ask the user for the operation
  • From lines 26 to 35 we check the user input an accordingly we call the corresponding method to performs the operation
7 0
3 years ago
NEED HELP FAST TIMED !!!!
Trava [24]

Answer:

oil rings = encloses combustion by closing off the extra space between the block and the head,

crank shaft = connects the engine to the transmition through a series of mechanisms.

gasket = reduces the amount of exhaust inside the cylinder by sealing the cylinder.

Explanation:

3 0
3 years ago
Read 2 more answers
Top 10 web hosting sites ?
swat32
I have only 5 so hope it helps.

1. bluehost
2. HostGator
3. GoDaddy
4. network solutions
5. web.com
7 0
3 years ago
Read 2 more answers
Pharming involves: setting up fake Wi-Fi access points that look as if they are legitimate public networks. redirecting users to
sweet-ann [11.9K]

Answer:

Explanation:

Pharming involves redirecting users to a fraudulent website even when the user has typed in the correct address in the web browser. An individual can accomplish this by changing the hosts file of the web address that the user is trying to access or by exploiting a DNS server error. Both of which will allow the individual to convince the victim that they are accessing the website that they were trying to access, but instead they have been redirected to a website that looks identical but is owned by the individual. The victim then enters their valuable and private information into the website and the individual can see it all and use it as they wish. Usually, this is done to steal banking information.

7 0
3 years ago
Other questions:
  • What is the maximum number of fonts that should be used on a slide?
    13·1 answer
  • ⭐️⭐️⭐️ what Network is larger in size? MAN or WAN? Thank you ⭐️⭐️⭐️
    5·1 answer
  • So, I have strict parents & need help, if u don’t know how to fix this after u read it, leave. I don’t want u getting points
    11·2 answers
  • __________ is a program that lets you share documents online with others.
    12·2 answers
  • The CMS Quarterly Provider Update (QPU) is an online CMS publication that contains information about __________ currently under
    14·1 answer
  • Which page in a web site do viewers usually see first?
    15·1 answer
  • Vicky is investigating multiple hacking attempts on her cloud-based e-commerce web servers. She wants to add a front-end securit
    5·1 answer
  • What is the output of the following program?
    8·1 answer
  • Convertbinary(111100)to decimal​​​​
    13·2 answers
  • 8. Which of the following is an output device
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!