Python Note.xlsx

  • Uploaded by: Lan Nhi
  • 0
  • 0
  • November 2019
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Python Note.xlsx as PDF for free.

More details

  • Words: 106
  • Pages: 3
Method

You have to import a function from math import sqrt from math import *: import all function in math, easy but pollute name space import math: you will have to type function as math.sqrt when using

Popular functions: 1 from math import sqrt, sin, cos, pi:

sqrt is part of math package

2 time function: measure how long the system runs for a specific task 3 from random import random random( ): floating number between 0 and 1 randomrange( ): integer number between your range choice Define new function Structure

Ex:

def name ( parameter list ) : block def promt(): print ('Enter a value:')

Related Documents

Python
November 2019 59
Python
June 2020 31
Python
June 2020 30
Python
November 2019 31
Python
May 2020 20
Python
April 2020 23

More Documents from ""

Python Note.xlsx
November 2019 12
Danh Ngon
April 2020 9
May 2020 5
May 2020 28