Friday, 24 March 2017
Wednesday, 22 March 2017
How to change Windows10 leptop theme ?
SEE THE VIDEO AND LEARN BATTER
PLEASE LIKE AND SUBSCRIBE MY CHANNEL
THANK YOU
Windows 10 ki autoupdate keise bandh kre?
Windows 10 ki autoupdate ek bohot hi bari problem hei , jike liye hame bhot sari data kharas krna prta hei . Aur ham aapni leptop ya desktop mei Browsing kar nhi pate hei.
To saliye aaj hm aapko btate hei ki iss problem se keise base aur aapni Computer mei maan saha browsing kare wo v kam data khars kiye .
Saliye suru krte hei...
Sunday, 19 March 2017
Python programming part-5 Strings
Strings : part-1
If you want to use text in Python , you have to use a string .
a string is created by entering text between two single or double quotation mark.
When the python console displays a string, it generally uses single quotes . The delimiter used for a string doesnot affect how behaves in any way .
>>> "Python is fun!"
'Python is fun!'
>>> 'Always look on the bright side of life'
'Always look on the bright side of life'
Question:
Complete the code to create a string containing "Hello World" .
>>>"Hello _____"
'Hello World'
____________________________________________________
Strings : part-2
Some characters can't be directly included in a string . For instance, double quotes can't be directly included in a double quote string ; this would cause it to end prematurely.
Characters like these must be escaped by placing a backslash before them.
Other common characters that must be escaped are newlines and backslashes.
Double quotes only need to be escaped in double quote string , and the same is true for single quote strings.
>>>'Brain\'s mother : He\'s not the Messiah.
He\'s a very naughty boy!'
'Brains's mother : He's not the Messiah . He's a very naughty boy!'
\n represents a new line.
_______________________________________
Newlines
Python provided an easy way to avoid manually writing "\n" to escape newlines in a string . Create a string with three sets of quotes , and newlines that are created by pressing Enter are automatically escaped for you .
>>>"""Customer: Good morning.
Owner: Good morning , Sir. Welcome to the National Cheese Emporium."""
'Customer: Good morning .\n Owner : Good morning , Sir . Welcome to the National Cheese Emporium.'
Question:
Fill the missing part of the output.
>>>"""First line.
second line"""
'First line ___second line'
____________________________________________________
Subscribe to:
Posts (Atom)