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
Whats your favorite .io game (example krunker.io, gawd.io)<br> (PS FWEE PTS BOIS)
marshall27 [118]

Answer:

starve.io

Explanation:

It's basically an entire game, you can play a single run for hours and it's all new content the entire way, not to mention it's actually difficult the entire way through.

4 0
2 years ago
This device operates at layer 2 but functions at the higher layers.
Stels [109]
A multilayer switch maybe?? I hope it’s right

6 0
3 years ago
Homework 8 Matlab Write a function called fibonacciMatrix. It should have three inputs, col1, col2, and n. col1 and col2 are ver
Amiraneli [1.4K]

In this exercise we have to use the knowledge in computational language in python to write the following code:

We have the code can be found in the attached image.

So in an easier way we have that the code is:

<em>function v = myfib(n,v)</em>

<em>if nargin==1</em>

<em>    v = myfib(n-1,[0,1]);</em>

<em>elseif n>1</em>

<em>    v = myfib(n-1,[v,v(end-1)+v(end)]);</em>

<em>end</em>

<em>end</em>

<em>function v = myfib(n,v)</em>

<em>if nargin==1</em>

<em>    v = myfib(n-1,[0,1]);</em>

<em>elseif n>1</em>

<em>    v = myfib(n-1,[v,v(end-1)+v(end)]);</em>

<em>elseif n<1</em>

<em>    v = 0;</em>

<em>end</em>

<em>function [n] = abcd(x)</em>

<em>if (x == 1 || x==0)</em>

<em>    n = x; </em>

<em>    return</em>

<em>else</em>

<em>    n = abcd(x-1) + abcd(x-2);</em>

<em>end</em>

<em>end</em>

<em>fibonacci = [0 1];</em>

<em>for i = 1:n-2</em>

<em>    fibonacci = [fibonacci fibonacci(end)+fibonacci(end-1)];</em>

<em>end</em>

<em>>> myfib(8)</em>

<em>ans =</em>

<em>    0    1    1    2    3    5    8   13</em>

<em>>> myfib(10)</em>

<em>ans =</em>

<em>    0    1    1    2    3    5    8   13   21   34</em>

See more about python at  brainly.com/question/18502436

8 0
2 years ago
Which of these agencies main goal is the promotion of consumer protection?Immersive Reader
sattari [20]

Answer:

FTC (Federal Trade Commission)

Explanation:

However, it is not just the one government body that works to ensure consumer protection. The FTC is certainly one, however, though the others are the Food and Drug Administration, Financial Protection Bureau and the US Department of Justice. And all these bodies together ensure that the rights of the consumer are protected, through enforcement of various acts, and each of them deals with a certain type of good.

6 0
3 years ago
Suppose that a scheduling algorithm (at the level of short-term CPU scheduling) favors those processes that have used the least
alekssr [168]

Answer:

Answer of the given question is :

I/O-bound

programs would not require much CPU usage, having short CPU bursts.

CPU-bound programs require large CPU bursts. CPU-bound processes do not

have to worry about starvation because I/O bound programs finish running

quickly allowing CPU-bound programs to use the CPU often.

Explanation:

I/O-bound

is a thread generally has a tight latency that needs a compare to computer bond thread on the windows workload.

When a mouse click then it response ASAP as compared to batch job which is running in the background.

If the outcome is slower, then the user switch the operating systems and server workload does not care about UI

8 0
3 years ago
Other questions:
  • When you make a pointer variable im C++, is star label a must?
    9·1 answer
  • Sanjay is giving a slideshow presentation on his entire college class and he is feeling quite nervous in order to share his pres
    9·1 answer
  • How might the website owner use theses details other than to verify login details?
    6·2 answers
  • Label provides the code that executes if no case label is matched ​
    6·1 answer
  • Which statement assigns the value 140 to the variable streetNumber in Python?
    13·1 answer
  • 100 points for this and brainlyist lol
    11·1 answer
  • Jak sie pisze oł na klawiaturze komputerowej
    11·1 answer
  • The different generation of computer explain in breif?​
    7·2 answers
  • (Language: Python) How can you know what value is in a variable by looking at the code?
    14·1 answer
  • What are the different elements of a window?​
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!