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
Schach [20]
2 years ago
13

Coding with Loops Worksheet

Computers and Technology
2 answers:
vovangra [49]2 years ago
7 0
Mmmmmmmmmmmmmmmmmmmmmmmm
Airida [17]2 years ago
4 0
Uhh this is giving me a headache
You might be interested in
Write a script that calculates the common factors between 8 and 24. To find a common factor, you can use the modulo operator (%)
AnnyKZ [126]

Answer:

  1. common = []
  2. num1 = 8
  3. num2 = 24
  4. for i in range(1, num1 + 1):
  5.    if(num1 % i == 0 and num2 % i == 0):
  6.        common.append(i)
  7. print(common)

Explanation:

The solution is written in Python 3.

Firstly create a common list to hold a list of the common factor between 8 and 24 (Line 1).

Create two variables num1, and num2 and set 8 and 24 as their values, respectively (Line 3 - 4).

Create a for loop to traverse through the number from 1 to 8 and use modulus operator to check if num1 and num2 are divisible by current i value. If so the remainder of both num1%i and num2%i  will be zero and the if block will run to append the current i value to common list (Line 6-8).

After the loop, print the common list and we shall get [1, 2, 4, 8]

8 0
3 years ago
How to add a while loop? here's my code
Jet001 [13]

To add while loop in python language, the use of syntax is to be brought into the effect.

<h3>What is a while loop?</h3>

A while loop can be referred to as an expression of code-blocks being true to their cores. Until the blocks of the code are not proved to be true, the loop continues.

In order to add such while loop to your code, one needs to use the syntax function in python to prove the true and correctness of the code blocks.

Hence, the procedure to add while loop has been aforementioned.

Learn more about a while loop here:

brainly.com/question/15690925

#SPJ1

3 0
2 years ago
_ ports are audiovisual ports typically used to connect large monitors. These ports are used with many Apple Macintosh computers
cestrela7 [59]

Thunderbolt ports are audiovisual ports typically used to connect large monitors.

<h3>What is a Thunderbolt port?</h3>

A Thunderbolt is known to be used in systems by users. It is one that helps its users to be able to use one cable to have an access to a high-speed and high-resolution media.

This is often done by using one port along with a cable that is able to access both DisplayPort and PCI Express. Thunderbolt is known to contain technology that has been built into it that helps PCI Express speed to come in a good and better way.

Learn more about ports  from

brainly.com/question/10097616

4 0
2 years ago
Question # 2 Multiple Choice The _____ method returns an integer between the two provided numbers. It can take the value of eith
nlexa [21]

Answer:

randint

Explanation:

7 0
3 years ago
Read 2 more answers
when you use an online mortgage calculator, normally you need to type in three items. which of the following is not one of these
STALIN [3.7K]
D) type of mortgage, as that is not neccessary to know.
5 0
3 years ago
Other questions:
  • Which statement describes the word "iterative"?
    9·1 answer
  • Consider the following classes: public class A { private int myNum; public A(int x) { myNum = x; } public int getNumber() { retu
    11·1 answer
  • Hen using presentation software, what do you do when you "compose a slide"?
    5·1 answer
  • A spreadsheet is an interactive computer program used for
    5·1 answer
  • What helped Taylor through her tough time with being bullied
    7·1 answer
  • A queueing system has four crews with three members each. The number of "servers" is:
    5·2 answers
  • The network architecture component that is a special LAN with a group of servers that enables electronic data exchange of betwee
    8·1 answer
  • Which is a common problem for inserting pictures into placeholders?
    10·1 answer
  • Jonah wants to type an assignment using Word. Arrange the steps he needs to follow in the correct order.?
    13·1 answer
  • What is a man-in-the-middle attack​
    14·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!