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
rjkz [21]
3 years ago
10

How do i move a file in python3

Computers and Technology
1 answer:
Levart [38]3 years ago
6 0

Answer:

To move a file in Python, we will need to import the os and shutil modules that provide us the ability to copy, move, and remove files in Python. Both of these modules provide methods to do so, although in many cases the shutil module has more convenient methods.

Keep in mind that the destination directory needs to exist in order for this example to work. Once you've set up the directories "d1" and "d2" (or just changed the example to fit your directory structure), run the code. Now check out the "d2" directory and you should see the xfile.txt if now present in that directory.

You might be interested in
Role of User Defined Iprms for creation of paten
Mazyrski [523]

Answer:

3

Explanation:

3 0
2 years ago
Write a q basic program to find the sum of all the even numbers from 1 to 50​
Artist 52 [7]

Answer:

CLS

M=2

SUM=0

DO WHILE M<=50

SUM=SUM+M

M=M+2

LOOP

PRINT " The sum of all even numbers between 1 and 50 is"; sum

5 0
3 years ago
What is the disadvantage of a mesh topology?
-BARSIC- [3]

Answer:

Topology means arrangement of nodes

Explanation:

In computer science the word topology means the arrangement of nodes and elements in a network. For any topology we do need nodes and cables for maintaining the infrastructure.

In mesh topology the all nodes use to get connected by direct link. While each and every node is directly associated with  one another. In this infrastructure we do need lot cabling where every node will be connected with one another. While usage of good quality cable in network is  also expensive to manage. Although there are lot of benefits of this topology, where the transmission of data would never stop if node is not working the rest will be working to transfer the data among other nodes ,this is more secure because there is no traffic for data to travel via many nodes   to reach the destination. Every node is directly connected and communicate. So, once the node is not working the communication will not be stop but the maintenance and troubleshooting will be difficult in this infrastructure.

It is proved along with lot of benefits and network security ,this infrastructure is having some disadvantages as well. Cabling expense , maintenance cost etc  . usually small scale networks do not prefer mesh topology.  Small scale and low budget companies can  not afford this topology because it is expensive.

Although we do believe that the data security is most important for today's era ,so few companies those wanted to keep their information secure and confidential they must use mesh topology by ignoring the cost incurred for this set up. Data security and integrity would never be compromised by some of the companies.

Mesh topology is more safer, more quick infrastructure which is although very expensive , difficult to mange and maintain. Moreover it is overhead of cabling as well to connect every node but the demand of mesh topology would never be less. It is demanding and appealing topology still.

7 0
3 years ago
Read 2 more answers
A computer retail store has 15 personal computers in stock. A buyer wants to purchase 3 of them. Unknown to either the retail st
Dima020 [189]

Answer:

a. 1365 ways

b. Probability = 0.4096

c. Probability = 0.5904

Explanation:

Given

PCs = 15

Purchase = 3

Solving (a): Ways to select 4 computers out of 15, we make use of Combination formula as follows;

^nC_r = \frac{n!}{(n-r)!r!}

Where n = 15\ and\ r = 4

^{15}C_4 = \frac{15!}{(15-4)!4!}

^{15}C_4 = \frac{15!}{11!4!}

^{15}C_4 = \frac{15 * 14 * 13 * 12 * 11!}{11! * 4 * 3 * 2 * 1}

^{15}C_4 = \frac{15 * 14 * 13 * 12}{4 * 3 * 2 * 1}

^{15}C_4 = \frac{32760}{24}

^{15}C_4 = 1365

<em>Hence, there are 1365 ways </em>

Solving (b): The probability that exactly 1 will be defective (from the selected 4)

First, we calculate the probability of a PC being defective (p) and probability of a PC not being defective (q)

<em>From the given parameters; 3 out of 15 is detective;</em>

So;

p = 3/15

p = 0.2

q = 1 - p

q = 1 - 0.2

q = 0.8

Solving further using binomial;

(p + q)^n = p^n + ^nC_1p^{n-1}q + ^nC_2p^{n-2}q^2 + .....+q^n

Where n = 4

For the probability that exactly 1 out of 4 will be defective, we make use of

Probability =  ^nC_3pq^3

Substitute 4 for n, 0.2 for p and 0.8 for q

Probability =  ^4C_3 * 0.2 * 0.8^3

Probability =  \frac{4!}{3!1!} * 0.2 * 0.8^3

Probability = 4 * 0.2 * 0.8^3

Probability = 0.4096

Solving (c): Probability that at least one is defective;

In probability, opposite probability sums to 1;

Hence;

<em>Probability that at least one is defective + Probability that at none is defective = 1</em>

Probability that none is defective is calculated as thus;

Probability =  q^n

Substitute 4 for n and 0.8 for q

Probability =  0.8^4

Probability = 0.4096

Substitute 0.4096 for Probability that at none is defective

Probability that at least one is defective + 0.4096= 1

Collect Like Terms

Probability = 1 - 0.4096

Probability = 0.5904

8 0
2 years ago
In your opinion, what is an example of an innovative solution to an engineering problem? Explain briefly why you chose this answ
Mumz [18]

Explanation:

One of the things I’ve been writing and talking about a lot lately is the fact that solving problems collaboratively is an incremental process. In fact, in my book, Lost at School, I made mention of the fact that the model could just as easily have been called Incremental Problem Solving or Progressive Problem Solving. I thought the collaborative aspect of the model was the most important to emphasize, but that doesn’t mean that the incremental component isn’t almost as crucial. Often people who are new to the model enter the process of resolving a problem as if it’s a one-shot deal. If you have experience in using Plan B, you already know that most problems require more than one visit to Plan B to resolve. In other words, longstanding, complicated problems aren’t likely to be resolved the first time you try to discuss them. There’s a lot of information to be processed before a given problem can be solved. You need to gather information so as to achieve the clearest possible understanding of the kid’s concern or perspective on the problem (for the unfamiliar, that’s called the Empathy step). Then, you need to be clear about and articulate your own concern (that’s the Define the Problem step). Then, you’ll want to brainstorm with the kid so as to consider the array of potential solutions that could be applied to the problem and consider whether each solution truly addresses the concerns of both parties (that’s the Invitation). There’s a good chance you won’t even make it through all three steps of Plan B in the first attempt on a given unsolved problem (nor should you necessarily even try). If Plan B were a “technique,” then disappointment over not making it through all three steps in one conversation would be understandable. But Plan B is not a technique, it’s a process. As I’ve often emphasized, if you only make it through the Empathy step in the first attempt at Plan B on a given problem but you emerge with a clear sense of a kid’s concern or perspective on a problem that’s been causing significant angst or conflict, that’s quite an accomplishment. You’ll get back to the remaining steps at your earliest opportunity. There’s also an excellent chance the first solution you and the kid agree on won’t solve the problem durably. As you may know, this is usually because the original solution wasn’t as realistic and mutually satisfactory as the two parties first thought. But it could also be because the concerns weren’t as clear or simple as it first seemed. If a solution doesn’t stand the test of time, your goal is to figure out why, which means gathering additional information about the concerns of the two parties and why the solution may not be working so well. Plan B should always conclude with both parties agreeing to return to the problem if the solution being agreed upon doesn’t solve the problem durably. So if your enthusiasm for Plan B waned because your first solution didn’t stand the test of time, take heart: that’s not unusual. Many people enter Plan B with great hope, eager to see their new approach to helping a challenging kid pay quick dividends. In fact, Plan B may well pay quick dividends…not necessarily because the problem is yet durably solved, but because of the relationship- and communication-enhancing that occurs. And while the occasional problem – often simple ones – can be resolved with one visit to Plan B, now you know that several repetitions of Plan B may be necessary on each unsolved problem. Thanks for reading.

3 0
3 years ago
Other questions:
  • What is the software called that allows the user to create, access, and manage a database? question 8 options:
    10·1 answer
  • You are running an application in Google App Engine that is serving production traffic. You want to deploy a risky but necessary
    9·1 answer
  • Write a program that takes in a line of text as input, and outputs that line of text in reverse. The program repeats, ending whe
    12·1 answer
  • The optional feature in a business letter is
    10·1 answer
  • public interface Displayable { void display(); } public class Picture implements Displayable { private int size; public void inc
    14·1 answer
  • A technician removes the cap from the brake fluid reservoir and finds that the rubber boot in the cap is swollen. technician a s
    8·1 answer
  • What is the different between ethical and legal issues?​
    6·1 answer
  • Which result is most likely if a network packet has no header?
    9·2 answers
  • Hey guys im just curious.... whats ur favorite number
    6·2 answers
  • Help a brotha out..................
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!