- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfirstscript.py
More file actions
Latest commit
107 lines (70 loc) · 2.65 KB
/
Copy pathfirstscript.py
File metadata and controls
107 lines (70 loc) · 2.65 KB
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
importurllib2 , time, sys
importjson
importtwisted
mainloop=1
#def mybot():
#what will be
whilemainloop==1 :
math1=0
math2=0
mathop=''
var1=0
input1=''
output1=0
input1=raw_input('type a command or press help for the directory of commands \n')
ifinput1=='calc' :
math1=raw_input('first number yo \n')
mathop=raw_input('What operator do you wish to use? \n')
math2=raw_input('Enter your fucking number why you waiting? \n')
math1=int(math1)
math2=int(math2)
ifmathop=='+' : output1=math1+math2
elifmathop=='-' : output1=math1-math2
elifmathop=='/' : output1=math1/math2
elifmathop=='*' : output1=math1*math2
print'you typed', math1 , mathop , math2, 'and the answer is', output1
elif"?"ininput1or"help"ininput1 :
print'calc - simple calculator \nhelp or ? - List of commands \nwebtools'
elifinput1=='webtools' :
newloop=1
whilenewloop==1 :
webchoice=raw_input('Enter a command or type ? / help for a command list \n')
ifwebchoice=='source' :
website=raw_input('enter a website \n').strip()
f=urllib2.urlopen(website)
printf.read(10000)
elif"?"inwebchoiceor"help"inwebchoice :
print'source - read source code from an url \nexit - back to main shell'
elifwebchoice=='exit' :
newloop=0
elifwebchoice=='google' :
f=urllib2.urlopen('https://www.googleapis.com/customsearch/v1?key=AIzaSyCkwcLmPLyHpeu6xE73d6kYL1-UVQgRXtA&cx=017576662512468239146:omuauf_lfve&q=cars')
printf.read(10000)
elifinput1=='for' :
foriinrange(20) :
printi
elifinput1=='exit' :
mainloop=0
elifinput1=='accounts' :
mainloop=1
elifinput1=='portal 3' :
life=1
whilelife==1 :
write=sys.stdout.write# write var stores sys function write
defwritewait(s): # declaring function
foriins: #i as counter in s as string in write
write(i) # writes to screen as sys function
sys.stdout.flush() # updates the screen
time.sleep(0.15) # pause until next for loop in
print'lol, Welcome to portal 3, prepare to be AMAZED \n\n'
writewait('hello...h e l l o . . .')
writewait('can you hear me link?\nits me navi ive come to get you to the cake')
userinput=raw_input('\nso can you?\n')
ifuserinput=='yes' :
writewait('thank god, we have to get out of here, do you see the portal there?')
ifuserinput=='yes' :
writewait('\ncan you please jump into it?')
else :
raw_input('forever alone')
else :
print'your as retarded as me'