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
Korolek [52]
3 years ago
8

TOPIC-PYTHON

Computers and Technology
2 answers:
Wewaii [24]3 years ago
6 0

Explanation:

r=r*10+d shifts the previous value to the left (by multiplying by 10) and adds a new digit.

So imagine r = 123 and you want to append 4 to it.

First r is multiplied by 10, so you have 1230. Then you add 4, and get 1234.

The r variable builds up the reverse of s, so it starts at 0.

mixer [17]3 years ago
4 0

This program prints a number with reversed digits. For example, if you input 3564, you'll get 4653.

Suppose you give s=45, and let's see what the code does line by line:

We give 45 as input, and define r=0.

Then, we enter the while loop. The instruction d = s%10 simply extracts the last digit from s. In this case, d=5.

The istruction r = r\ast 10+d adds a 0 at the end of the current value of r. Then we add d, so now the last digit of r is d: we're performing

0\cdot 10 + 5 = 5

Finally, the integer division s = s//10 cuts the last digit from s. So, after the first loop, we have

d=5,\quad r=5,\quad s=4

We enter the loop again. we have

d = s\%10 = 4\%10 = 4

The new value of r is

5\cdot 10 + 4 = 54

And the division s//10 returns 0, so we exit the loop.

And indeed we have r=54, which is 45 in reverse.

You might be interested in
A hydraulic lift has a mechanical advantage of 5. If the load weighs 350 N, what effort is required to lift the weight? Provide
Dmitrij [34]

If the load weighs 350 N, the effort that is required to lift the weight is 70 N

To answer the question, we need to know what mechanical advantage is.

<h3>What is mechanical advantage?</h3>

The mechanical advantage of the hydraulic lift M.A = L/E where

  • L = load and
  • E = effort.
<h3>Effort required to lift the weight</h3>

Making E subject of the formula, we have

E = L/M.A

Given that

  • M.A = 5 and
  • L = 350 N,

substituting the values of the variables into the equation, we have

E = L/M.A

E = 350 N/5

E = 70 N

So, the effort that is required to lift the weight is 70 N

Learn more about mechanical advantage here:

brainly.com/question/26440561

#SPJ1

7 0
3 years ago
The three tasks within data harmonization, namely: data consolidation, data cleansing, and data formatting use techniques called
-BARSIC- [3]

The three tasks within data harmonization, namely: data consolidation, data cleansing, and data formatting use techniques called harmonization rules that implement those tasks -The statement is true

Explanation:

Data harmonization refers to the process of combining the data of varying files and formats ,name conventions and columns and transforming the same into one data set.

Data harmonization refers to the process of integrating multiple data source into a single data set.

By adopting the Data harmonization technique we can reduce the problem of redundant data and conflicting standard

The name harmonization is an analogy to the process to harmonizing discordant music.

The goal of data harmonization is to find commonalities, identify critical data that need to be retained, and then provide a common standard.

6 0
4 years ago
Which structure is the arrow pointing to?<br><br> What is the function of this organelle?
Lapatulllka [165]

Answer:

The arrow is pointing to the nucleus. The function of a nucleus is that is stores the DNA of a cell. It also regulate and control the activities that go on in the cell like groth, and metabolism.

5 0
2 years ago
Write a method, makeSubjectLine, that gets a String argument and returns the same String but with "Subject: " in front of it. So
Anna [14]

Answer:

public class newass {

   /*

   Write a method, makeSubjectLine, that gets a String argument and returns the same String but with "Subject: " in front

   of it. So if the argument is "Are you going to the show?" the method returns "Subject: Are you going to the show?".

    */

   public static void main(String[] args) {

       System.out.println(makeSubjectLine("Are you going to the show?"));

   }

   public static String makeSubjectLine(String subj){

       return "Subject: "+subj;

   }

}

Explanation:

The solution in Java Programming Language

6 0
3 years ago
Write a report on the effectiveness of using thicker bags. Remember to include the effect on the environment and the economy in
malfutka [58]

The effectiveness of using thicker bags are:

  • It has the lowest environmental impact in terms of any other disposable bag.
  • It can be used three to six more times.
  • It is environmentally sustainable.

<h3>What is the effect of thicker plastic bags have on the environment?</h3>

The use of plastic bags is known to have some form of detrimental effects on the such as animal choking, pollution, and others.

Conclusively, Note that thicker bags needs a lot of plastic to be able to produce it and it goes to waste even if a person do not use it again.

Learn more about environment from

brainly.com/question/17413226

4 0
2 years ago
Other questions:
  • kara, darrell and jose all enjoy watching comedies online. kara and jose also enjoy watching dramas. using content-based filteri
    12·1 answer
  • What are the best apps to learn coding
    15·2 answers
  • Forms are used to a provide a more user-friendly way to work with data in tables
    14·1 answer
  • The Maui coffee shop sells coffee at $10.50 a pound plus the cost of shipping. Each order ships for $0.86 per pound + $1.50 fixe
    14·1 answer
  • Which network component allows computers to communicate on a network without being connected directly to each other?
    9·1 answer
  • Modify your solution to Problem 8.24 so that one (and only one) child installs a Segmentation-fault handler which prints an erro
    10·1 answer
  • Clunker Motors Inc. is recalling all vehicles from model years 1995-1998 and 2004-2006. A boolean variable named recalled has be
    8·1 answer
  • What are types of computer viruses
    11·2 answers
  • TCP connections require a lot of overhead, as compared to UDP. Explain why web sites and file transfers are nevertheless typical
    11·1 answer
  • 2. Why do you think the order of operations still applies in Java? Give an example to show what could happen if you didn't use o
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!