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
blondinia [14]
3 years ago
15

NumA=2 for count range (5,8) numA=numA+count print(numA)

Computers and Technology
1 answer:
love history [14]3 years ago
7 0

Answer:

for count in range (5,8): numA=numA+count print(numA)

Explanation:

You might be interested in
HELP!!!<br> THIS HAPPENS EVERY TIME
Lelu [443]
Idek but hope u figure it out!
4 0
3 years ago
Read 2 more answers
Write a java program called allDigitsOdd that returns whether every digit of a positive integer is odd. Return true if the numbe
Vlada [557]

Answer:

public class Digits

{

   public static boolean allDigitsOdd(int num)

   {

       boolean flag=true;

       int rem;

       while(num>0)

       {

           rem=num%10;

           num=num/10;

           if(rem%2==0)    // if a even digit found immediately breaks out of loop

           {

               flag=false;

               break;

           }

       }

       return flag;     //returns result

   }

   public static void main(String args[])

   {

       System.out.println(allDigitsOdd(1375));    //returns true as all are odd digits

   }

}

OUTPUT :

true

Explanation:

Above program has 2 static methods inside a class Digits. Logic behind above function is that a number is divided by 10 until it is less than 0. Each time its remainder by 0 is checked if even immediately breaks out of the loop.

4 0
3 years ago
Thanks to ____ files, a website can recognize you and cater to your individual tastes each time you visit.
Licemer1 [7]
Saved files now and days
4 0
3 years ago
5.14 Describe how the compare and swap() instruction can be used to provide mutual exclusion that satisfies the bounded-waiting
Naddik [55]

Answer:

Explained below

Explanation:

Compare and Swap(C&S) is simply an atomic operation whereby the compare and swap operations are automatically executed.

Now compare and Swap basically needs 3 arguments namely:

- 2 old values which we will label X and Y

- 1 new value which is written in X that we will call Z

Thus, we now have; C & S = {X, Y, Z}

To explain this well, let X be a variable where X has a value of 7.

Now, if a programmer gives a program me that X be multiplied by 2,then what C&S operation will do is;

I) Y = X where Y is a new variable.

II) Result = C&S(X, Y, X*7)

Variable X is global and this means that mere than one process and more than 1 thread can see the variable X.

Now, if a process named P1 wants multiply the variable X by 7 using C&S operation, it will first make a local copy of variable X (which in this case is now the new variable Y). After that it will atomically compare X & Y and if they are equal, it will replace X with 10X.

However, if they are not equal, P1 will re-read value of X into Y and carry of C&S instruction again.

8 0
3 years ago
SO cLoSe yEt sO fAr aWaAaAaAy...
AlekseyPX
I’m so proud lol lol
8 0
3 years ago
Read 2 more answers
Other questions:
  • What is called photo and video edition?
    8·1 answer
  • Controller Area Network CAN B bus diagnostics is being discussed. Technician A says some modules do not set specific codes that
    13·1 answer
  • When a rectangular region is defined using an appropriate style, which value matches the specified edge of the clipping region t
    7·1 answer
  • Which principle of animation deals with imparting a unique identity to the animated character?
    5·1 answer
  • Please check my answer! (Java)
    8·1 answer
  • QUESTION
    14·1 answer
  • Which term refers to the capability of a switch to copy data from any or all physical ports on a switch to a single physical por
    5·1 answer
  • What is the importance of different camera angles ?
    9·2 answers
  • You want to be able to identify the services running on a set of servers on your network. Which tool would best give you the inf
    11·1 answer
  • A timer is set after each frame is sent before waiting an ACK for that frame, how long does the timer take to be expired?
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!