Question

In python. how to run a .py file (not a ipynb file) in the anaconda prompt....

In python. how to run a .py file (not a ipynb file) in the anaconda prompt. Please write steps

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Let's say your file Hello.py is saved in /Desktop/Hello.py


>>> (This three arrow means we are in Python )


>>> python /Desktop/Hello.py  

The above command will make sure it will run Hello.py file.

So its like >>> python File.py


Thanks, we can play with >>> prompt and execute different python commands, LET me know if there is any concern, PLEASE COMMENT

Add a comment
Know the answer?
Add Answer to:
In python. how to run a .py file (not a ipynb file) in the anaconda prompt....
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Python Problem Write a .py file like nameFiles.py. In that .py, create a function that strips the...

    Python Problem Write a .py file like nameFiles.py. In that .py, create a function that strips the first letters from all file names in a directory. If the new name is a duplicate of an existing name, Python will throw an exception. Handle that exception by adding “dup” a number as part of the files new name. Call that function from a Jupyter Notebook, passing in the number of characters to delete and the file path.

  • Write a PYTHON program that reads a file (prompt user for the input file name) containing...

    Write a PYTHON program that reads a file (prompt user for the input file name) containing two columns of floating-point numbers (Use split). Print the average of each column. Use the following data forthe input file: 1   0.5 2   0.5 3   0.5 4   0.5 The output should be:    The averages are 2.50 and 0.5. a)   Your code with comments b)   A screenshot of the execution Version 3.7.2

  • Write a Python program stored in a file q2.py that asks for a starting number and...

    Write a Python program stored in a file q2.py that asks for a starting number and an ending number, and then prints all the Fibonacci numbers between them (and including the starting and ending numbers, if they are also Fibonacci numbers). Each Fibonacci number, must be separated by a space. Example: Enter starting number : 5 Enter ending number : 500 10 Fibonacci numbers between 5 and 500 are : 5 8 13 21 34 55 89 144 233 377

  • ANACONDA PYTHON 3 NOTEBOOK. In this assignment you will calculate how far a ball will travel....

    ANACONDA PYTHON 3 NOTEBOOK. In this assignment you will calculate how far a ball will travel. The distance travel by a ball as it bounces can be measured as a percentage of the height form which the ball was dropped. We will call this the bounceIndex.  For example a ball dropped from a height of 10 feet that bounces 6 feet high has an index of 60% (.60).  A ball with a bounceIndex of .6 that is dropped from a height of...

  • PYTHON 3.6.1 write a script named copyfile.py. this script should prompt the user for the names...

    PYTHON 3.6.1 write a script named copyfile.py. this script should prompt the user for the names of two text files. the contents of the first file should be input and written to the second file.

  • Don't understand why code isn't running properly Scottir.UnitB.py D/Python/Scottir UnitB.py (670 File Edit Format Run Options...

    Don't understand why code isn't running properly Scottir.UnitB.py D/Python/Scottir UnitB.py (670 File Edit Format Run Options Window Help #Declare a variab i e and initialize it def displayInstructions (1angCode): 3tr . ENGLISHPROMPT = "Please enter your weight in poundョ >> " str.SPANISH PROMPT Por favor entre en su peso en libras > if langCode1: - print ("ENGLISH prompt) print ("SPANISH prompt") print ("Stop") elif langCode2 else: code input ( Enter code for instructions") num code weight = input ("Enter weight...

  • Submit a single file named hw0.py that contains the solutions to the problems below. When you...

    Submit a single file named hw0.py that contains the solutions to the problems below. When you are finished, test your solutions using the doctest: copy the file hw0TEST.py from d2l into your working folder. include the following code at the bottom of the module hw0.py, and then run your module.   Fix all failures before you submit your solutions. if __name__=='__main__':     import doctest     print( doctest.testfile( 'hw0TEST.py')) Write a function moreOdds that accepts one argument, a list of integers.   The function then...

  • Using Spyder (or the IDE of choice), create a new file named Assignment1.py and write a...

    Using Spyder (or the IDE of choice), create a new file named Assignment1.py and write a Python program using the Editor that produces the following output: My name is Razan Abdelgalil. I am taking CIS 195 at Cabrini University. 1 + 1 = 2 (use an arithmetic operator for the calculation)

  • Please write comments with the program. Python programming!! Part III - write student data In this...

    Please write comments with the program. Python programming!! Part III - write student data In this part the program should create a .csv file and fill it with generated student information. The program should: Ask the user for a name for the .csv file (use your own name for the exercise) Create the .csv file with columns named - ID, first-name, GPA Based on the information received in part I, generate and fill students information in the CSV file Tell...

  • For Python-3 I need help with First creating a text file named "items.txt" that has the...

    For Python-3 I need help with First creating a text file named "items.txt" that has the following data in this order: Potatoes Tomatoes Carrots. Write a python program that 1. Puts this as the first line... import os 2. Creates an empty list 3. Defines main() function that performs the tasks listed below when called. 4. Put these two lines at the top of the main function... if os.path.exists("costlist.txt"): os.remove("costlist.txt") Note: This removes the "costlist.txt" file, if it exists. 5....

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT