-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathl01.py
84 lines (31 loc) · 794 Bytes
/
l01.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
import math
import webbrowser
def helloWorld():
print("hello wolrd!")
helloWorld()
#print(1/0)
print("2+2=5")
print("Carpe")
print("diem")
print("Carpe ", end="")
print("diem")
print() # blank line
#Compute the hypotenuse of a right trigangle
a = 3
b = 4
c = ((a**2 + b**2))**0.5
print("side a = ", a)
print("side b = ", b)
print("hypttenuse c = ", c)
#Basic console input
#name = input("Enter ur name: ")
#print("Ur name is:", name)
# ''空串不能转换成0
#x = int(input("Enter a number: "))
#print("One half of", x , "=", x/2) # type
#Importing modules
print(math.factorial(20))
#list all fns in math module
print(dir(math))
input("Hit enter to see the online docs for the math module.")
webbrowser.open("https:www.baidu.com")