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
  • 19,456
  • 5
  • 52
  • 81
Dikesh Kumar
  • 173
  • 4
  • 14

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
  • 521
  • 3
  • 13