Skip to content

Commit ca7944e

Browse files
committed
Add new files
1 parent 0039a4e commit ca7944e

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

Diff for: domain.py

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
def domain_name(url):
2+
return url.split("//")[-1].split("www.")[-1].split(".")[0]
3+
4+
5+
print domain_name("http://github.com/carbonfive/raygun")
6+
print domain_name("http://www.zombie-bites.com")
7+
print domain_name("https://www.cnet.com")

Diff for: var_assn.py

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
a = "code"
2+
b = "wa.rs"
3+
name = a + b
4+
5+
print name
6+
7+
def DNAtoRNA(dna):
8+
result = ""
9+
for i in dna:
10+
if i == "T":
11+
result += "U"
12+
else:
13+
result += i
14+
15+
return result
16+
17+
print DNAtoRNA("TTTT")
18+
print DNAtoRNA("GCAT")

0 commit comments

Comments
 (0)