-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
117 lines (77 loc) · 1.46 KB
/
main.py
File metadata and controls
117 lines (77 loc) · 1.46 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
108
109
110
111
112
113
114
115
116
117
from classes.myclass import MyClass
import math
import os
import sys
def myFunction():
print("THIS IS A FUNCTION")
def myFunction2():
print("THIS IS A FUNCTION22222222222222222222222222222222222222")
def add(x, y):
return x + y
def print_lines():
print("oooooo babe babe")
print("oooooo babe babe")
def printtwice(bruce):
print(bruce)
print(bruce)
print(os.open(".",))
print(add(5, 1))
# System.out.print("Hello World")
print("Hello World")
x = 1
# It Statment
if x == 1:
print("X = 1")
else:
print("X != 1")
# Int
# int myInt = 7
myInt = 7
# Float
# double = 7.0
myFloat = 7.0
myFloat = float(7)
# Boolean
# boolean myBoolean = true
myBoolean = True
# String
# String myString = "Hello World"
myString = "Hello World"
one = 1
two = 2
three = one + two
print(three)
hello = "Hello"
world = "World"
helloWorld = hello + " " + world
print(helloWorld)
a, b = 3, 4
myList = []
myList.append(1)
myList.append(2)
myList.append(3)
print(myList[0])
print(myList[1])
print(myList[2])
for i in myList:
print(i)
aString = "A Magic String"
print(aString[3:10])
print(aString[3:10:2])
print(aString[2])
print(aString.upper())
print(aString.lower())
myFunction()
myFunction2()
zzz = MyClass("cake")
zzz.messageMe()
print(type(aString)==type(aString))
print(str(int('11')+one))
print(aString + " " + str(one))
print(str(math.pi * 10))
print(math)
print(type(math))
print_lines()
print(type(print_lines()))
printtwice('17')
exit(0)