-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathfunctions.py
47 lines (31 loc) · 803 Bytes
/
functions.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
# brenda = 10
# mike = 'tina'
# jacob = [1,2,3,4,5,6,7]
# def add_values(name, age = "nothing is here", sex='male'):
# print(age)
# print(name)
# print(sex)
# print("hello world!")
# add_values('josh', 12, "female")
# add_values(12, 15)
# add_values(brenda, mike)
# add_values(mike, brenda)
# add_values(jacob, "josh", 12)
# add_values(jacob)
# add_values(age=12, sex = "female", name='josh')
import requests
def multiple(value):
return value * 1000
def get_websites(url):
response = requests.get(url)
length = len(response.text)
multiplier = multiple(length)
return multiplier
val1 = get_websites('https://cisco.com')
val2 = get_websites('https://yahoo.com')
print(val1)
print(val2)
val3 = multiple(val2)
val4 = multiple(val3)
print(val3)
print(val4)