0

I am trying to run a python program

import random
random.random()

Written in notepad in two different lines,I want to run it in cmd.how to do it?

gboffi
  • 22,939
  • 8
  • 54
  • 85
Dikesh Kumar
  • 193
  • 1
  • 5
  • 16

1 Answers1

1
  1. Save the program with a .py extention. For example: hello.py
  2. Then run it with python <script_name>.py. For example: python hello.py
Aswin P J
  • 546
  • 4
  • 13