<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Ramesh Ramasamy</title>
    <description>The latest articles on DEV Community by Ramesh Ramasamy (@ramesh_ramasamy).</description>
    <link>https://dev.to/ramesh_ramasamy</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1747774%2Ffbdcaa5f-c48d-4701-b17e-f4d2ae3d335b.jpg</url>
      <title>DEV Community: Ramesh Ramasamy</title>
      <link>https://dev.to/ramesh_ramasamy</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ramesh_ramasamy"/>
    <language>en</language>
    <item>
      <title>Day 1</title>
      <dc:creator>Ramesh Ramasamy</dc:creator>
      <pubDate>Tue, 09 Jul 2024 05:58:36 +0000</pubDate>
      <link>https://dev.to/ramesh_ramasamy/day-1-bhm</link>
      <guid>https://dev.to/ramesh_ramasamy/day-1-bhm</guid>
      <description>&lt;p&gt;For the initial refresh of my Python Programming started with the print statements, format, float/string display, concatenation (with/out space), displaying special character (such as \ (backslash), " (double-quotes))&lt;/p&gt;

&lt;p&gt;For all the the programming execution used the online compilers &lt;strong&gt;(link: &lt;a href="https://www.programiz.com/python-programming/online-compiler/" rel="noopener noreferrer"&gt;https://www.programiz.com/python-programming/online-compiler/&lt;/a&gt;)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;My PC also having Python 3.12.x &lt;/p&gt;

&lt;p&gt;PS C:\Users\usr&amp;gt; python --version&lt;br&gt;
&lt;strong&gt;Python 3.12.3&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;----- below is some sample experiments and its coding part -----&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;How do you print the string “Hello, world!” to the screen?&lt;br&gt;
*&lt;/em&gt;&lt;br&gt;
&lt;code&gt;print("Hello, world!")&lt;br&gt;
&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;How do you print the value of a variable name which is set to “Syed Jafer” or Your name?&lt;br&gt;
*&lt;/em&gt;&lt;br&gt;
&lt;code&gt;name="First Second"&lt;br&gt;
print("Name: ", name)&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;How do you print the variables name, age, and city with labels “Name:”, “Age:”, and “City:”?&lt;br&gt;
*&lt;/em&gt;&lt;br&gt;
&lt;code&gt;name="First Second"&lt;br&gt;
age=25&lt;br&gt;
City="Current Place"&lt;br&gt;
print("Name:", name)&lt;br&gt;
print("Age:", age)&lt;br&gt;
print("City:", City)&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;How do you use an f-string to print name, age, and city in the format “Name: …, Age: …, City: …”?&lt;br&gt;
*&lt;/em&gt;&lt;br&gt;
&lt;code&gt;name="First Second"&lt;br&gt;
age=25&lt;br&gt;
City="Current Place"&lt;br&gt;
print(f"Name:", name)&lt;br&gt;
print(f"Age:", age)&lt;br&gt;
print(f"City:", City)&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;How do you concatenate and print the strings greeting (“Hello”) and target (“world”) with a space between them?&lt;br&gt;
*&lt;/em&gt;&lt;br&gt;
`greeting="Hello"&lt;br&gt;
target="world"&lt;/p&gt;

&lt;p&gt;print(greeting, target)`&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;How do you print three lines of text with the strings “Line1”, “Line2”, and “Line3” on separate lines?&lt;br&gt;
*&lt;/em&gt;&lt;br&gt;
&lt;code&gt;text1="Line1"&lt;br&gt;
text2="Line2"&lt;br&gt;
text3="Line3"&lt;br&gt;
print(text1+"\n"+text2+"\n"+text3)&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;How do you print the string He said, "Hello, world!" including the double quotes?&lt;br&gt;
*&lt;/em&gt;&lt;br&gt;
&lt;code&gt;print(f"\"Hello World\"")&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;How do you print the string C:\Users\Name without escaping the backslashes?&lt;br&gt;
*&lt;/em&gt;&lt;br&gt;
&lt;code&gt;print(f"c:\\Users\\Name")&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;How do you print the result of the expression 5 + 3?&lt;br&gt;
*&lt;/em&gt;&lt;br&gt;
&lt;code&gt;result=5+3&lt;br&gt;
print(result)&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;another way&lt;br&gt;
*&lt;/em&gt;&lt;br&gt;
&lt;code&gt;print(5+3)&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;How do you print the strings “Hello” and “world” separated by a hyphen -?&lt;br&gt;
*&lt;/em&gt;&lt;br&gt;
&lt;code&gt;print(f"hello"+"-"+"world")&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;How do you print the string “Hello” followed by a space, and then print “world!” on the same line?&lt;br&gt;
*&lt;/em&gt;&lt;br&gt;
&lt;code&gt;print(f"Hello", "World!")&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;How do you print the value of a boolean variable is_active which is set to True?&lt;br&gt;
*&lt;/em&gt;&lt;br&gt;
&lt;code&gt;is_active=True&lt;br&gt;
print(is_active)&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;How do you print the string “Hello ” three times in a row?&lt;br&gt;
*&lt;/em&gt;&lt;br&gt;
&lt;code&gt;print(3*"Hello")&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;How do you print the sentence The temperature is 22.5 degrees Celsius. using the variable temperature?&lt;br&gt;
*&lt;/em&gt;&lt;br&gt;
&lt;code&gt;temperature=22.5&lt;br&gt;
print("The temperature is", temperature, "degrees Celsius")&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;How do you print name, age, and city using the .format() method in the format “Name: …, Age: …, City: …”?&lt;br&gt;
*&lt;/em&gt;&lt;br&gt;
&lt;code&gt;name="First Second"&lt;br&gt;
age=25&lt;br&gt;
city="Current living"&lt;br&gt;
print("Name: {}, Age: {}, City: {}".format(name, age, city))&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;How do you print the value of pi (3.14159) rounded to two decimal places in the format The value of pi is approximately 3.14?&lt;br&gt;
*&lt;/em&gt;&lt;br&gt;
&lt;code&gt;pi = 22/7 #3.14159&lt;br&gt;
print("Normal display as float", pi)&lt;br&gt;
print("The value of pi after 2 decimal truncated using format is  {:.2f}".format(pi))&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;How do you print the words “left” and “right” with “left” left-aligned and “right” right-aligned within a width of 10 characters each?&lt;br&gt;
*&lt;/em&gt;&lt;br&gt;
`left="Left-aligned"&lt;br&gt;
right="Right-Aligned"&lt;/p&gt;

&lt;p&gt;print("Left: {:.10s} Right: {:.10s}".format(left, right))`&lt;/p&gt;

</description>
      <category>python</category>
      <category>refresh</category>
      <category>cheatsheet</category>
      <category>programming</category>
    </item>
  </channel>
</rss>
