-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDAY_6.py
More file actions
48 lines (23 loc) · 801 Bytes
/
Copy pathDAY_6.py
File metadata and controls
48 lines (23 loc) · 801 Bytes
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
#!/usr/bin/env python
# coding: utf-8
# Python Functions and Karel
# In[5]:
# Function - a piece of code whose functionality is already defined at some else place and we just use it to perform somthing automatically - followed by parenthesis
print(3)
len("3798") # len is a string function and don't perform for the integers or flots
# In[9]:
# Defining your own function
def my_func(): # define the function
print("HEllo") # do this
print("World") # now this
# end - do next thing out of function indentatin
my_func() # Triggering the function to awake it
# In[10]:
# Using Reeborg's World to learn python
# In[1]:
# Indentation - use spaces for indentation -
# In[ ]:
# While Loop
x = 1:
while x < 2:
print(x)