My Python Practice Catalog
A collection of all the code i created while #100DaysOfPython
A collection of all the code i created while #100DaysOfPython
Task 01
Print 'Twinkle Twinkle Little Star Poem'
# Day 01 - Task 01
# Print the poem 'twinkle twinkle little star' with python
print("Line 1: Twinkle Twinkle little star\nLine 2: How i wonder what you are\nLine 3: Up above the world so high\nLine 4: Like a diamond in the sky")
Task 02
Print the table of five with 'REPL' but i used vs code to do it
# Day 1 - Task 02
# Print the table of five with 'REPL' but i used vs code to do it
print(5*1)
print(5*2)
print(5*3)
print(5*4)
print(5*5)
print(5*6)
print(5*7)
print(5*8)
print(5*9)
print(5*10)
Task 03
Import an external module and use it
# Day 01 - Task 03
# Import an external module and use it
import lorem;
myParagraph = lorem.paragraph();
# this is going to output the generated by the 'paragraph' method
print(myParagraph + "\n");
# this print statment will directly output the return value of 'paragraph()' method
print(lorem.paragraph());
Task 01
Literals in Python, 'Literals' in Python are described as the constant values.
#Day 02 - Task 01: Literals in Python
#Literals in Python are described as the constant values
#Ex: 'c', "Hello!", 58, 58.6
#String Literal
greeting = "Hello"
intro = "I am ARK"
fullStop = '.'
# combning two strings (concatenation)
string = greeting + intro + fullStop
#numerical literal(s)
floatValue = 3.142
intValue = 21072004
Task 02
'Conversions' in Python
#Day 02 - Task 02: Conversions in Python
# converting 'string' into 'int'
stringNum = '58'
intNum = stringNum
# 'float' to 'int'
floatNum = 3.142 #value in 'float'
otherIntNum = int(floatNum) #floatNum value converted in 'int'
Task 01
'sep' and 'end' in "print()"
#Day 05 - Task 01: 'sep' and 'end' in "print()"
# 'sep'
# when using 'string concatenation' you can use "sep"
# to define what charachter should come in between strings
print("I","am","ARK", sep="-") # '-' is printed in b/w strings
# 'end'
# the end is used to append a constant charachter at the end
# of a string
print("I am 18", end="y/o\n")
print("My Height = 5.6", end=" ft\n")
=======
A collection of all the code i created while #100DaysOfPython
Task 01
Print 'Twinkle Twinkle Little Star Poem'
# Day 01 - Task 01
# Print the poem 'twinkle twinkle little star' with python
print("Line 1: Twinkle Twinkle little star\nLine 2: How i wonder what you are\nLine 3: Up above the world so high\nLine 4: Like a diamond in the sky")
Task 02
Print the table of five with 'REPL' but i used vs code to do it
# Day 1 - Task 02
# Print the table of five with 'REPL' but i used vs code to do it
print(5*1)
print(5*2)
print(5*3)
print(5*4)
print(5*5)
print(5*6)
print(5*7)
print(5*8)
print(5*9)
print(5*10)
Task 03
Import an external module and use it
# Day 01 - Task 03
# Import an external module and use it
import lorem;
myParagraph = lorem.paragraph();
# this is going to output the generated by the 'paragraph' method
print(myParagraph + "\n");
# this print statment will directly output the return value of 'paragraph()' method
print(lorem.paragraph());
Task 01
Literals in Python, 'Literals' in Python are described as the constant values.
#Day 02 - Task 01: Literals in Python
#Literals in Python are described as the constant values
#Ex: 'c', "Hello!", 58, 58.6
#String Literal
greeting = "Hello"
intro = "I am ARK"
fullStop = '.'
# combning two strings (concatenation)
string = greeting + intro + fullStop
#numerical literal(s)
floatValue = 3.142
intValue = 21072004
Task 02
'Conversions' in Python
#Day 02 - Task 02: Conversions in Python
# converting 'string' into 'int'
stringNum = '58'
intNum = stringNum
# 'float' to 'int'
floatNum = 3.142 #value in 'float'
otherIntNum = int(floatNum) #floatNum value converted in 'int'
Task 01
'sep' and 'end' in "print()"
#Day 05 - Task 01: 'sep' and 'end' in "print()"
# 'sep'
# when using 'string concatenation' you can use "sep"
# to define what charachter should come in between strings
print("I","am","ARK", sep="-") # '-' is printed in b/w strings
# 'end'
# the end is used to append a constant charachter at the end
# of a string
print("I am 18", end="y/o\n")
print("My Height = 5.6", end=" ft\n")