<?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: francnstein</title>
    <description>The latest articles on DEV Community by francnstein (@francnstein).</description>
    <link>https://dev.to/francnstein</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%2F356004%2Fae3d0df1-4401-4e3c-be9d-5467ef9cd4c0.jpg</url>
      <title>DEV Community: francnstein</title>
      <link>https://dev.to/francnstein</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/francnstein"/>
    <language>en</language>
    <item>
      <title>itertools
(python3)</title>
      <dc:creator>francnstein</dc:creator>
      <pubDate>Tue, 19 May 2020 19:07:18 +0000</pubDate>
      <link>https://dev.to/francnstein/itertools-python3-2o60</link>
      <guid>https://dev.to/francnstein/itertools-python3-2o60</guid>
      <description>&lt;p&gt;itertools&lt;/p&gt;

&lt;p&gt;The module itertools is a standard library that contains several functions that are useful in functional programming. &lt;br&gt;
One type of function it produces is infinite iterators. &lt;br&gt;
The function count counts up infinitely from a value. &lt;br&gt;
The function cycle infinitely iterates through an iterable (for instance a list or string). &lt;br&gt;
The function repeat repeats an object, either infinitely or a specific number of times.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Lambda</title>
      <dc:creator>francnstein</dc:creator>
      <pubDate>Fri, 15 May 2020 08:27:39 +0000</pubDate>
      <link>https://dev.to/francnstein/lambda-5cl0</link>
      <guid>https://dev.to/francnstein/lambda-5cl0</guid>
      <description>&lt;p&gt;Lambda functions aren't as powerful as named functions. &lt;br&gt;
They can only do things that require a single expression - usually equivalent to a single line of code.&lt;/p&gt;

&lt;h1&gt;
  
  
  named function
&lt;/h1&gt;

&lt;p&gt;def polynomial(x):&lt;br&gt;
    return x**2 + 5*x + 4&lt;br&gt;
print(polynomial(-4))&lt;/p&gt;

&lt;h1&gt;
  
  
  lambda
&lt;/h1&gt;

&lt;p&gt;print((lambda x: x**2 + 5*x + 4) (-4))&lt;/p&gt;

&lt;p&gt;0&lt;br&gt;
0&lt;/p&gt;

</description>
      <category>python</category>
      <category>codenewbie</category>
    </item>
    <item>
      <title>String Functions  (Python3)</title>
      <dc:creator>francnstein</dc:creator>
      <pubDate>Fri, 08 May 2020 23:22:32 +0000</pubDate>
      <link>https://dev.to/francnstein/string-functions-python3-3l55</link>
      <guid>https://dev.to/francnstein/string-functions-python3-3l55</guid>
      <description>&lt;p&gt;On my journey to learn my first language(python) I thought I would document anything that has helped me. As I get better and work on projects I will share them also.&lt;/p&gt;

&lt;p&gt;Python contains many useful built-in functions and methods to accomplish common tasks. &lt;br&gt;
join - joins a list of strings with another string as a separator. &lt;br&gt;
replace - replaces one substring in a string with another.&lt;br&gt;
startswith and endswith - determine if there is a substring at the start and end of a string, respectively. &lt;br&gt;
To change the case of a string, you can use lower and upper.&lt;br&gt;
The method split is the opposite of join, turning a string with a certain separator into a list.&lt;/p&gt;

&lt;p&gt;Some things I am interested in. &lt;br&gt;
&lt;a href="https://linktr.ee/franczalezoriginals"&gt;https://linktr.ee/franczalezoriginals&lt;/a&gt;&lt;/p&gt;

</description>
      <category>python</category>
      <category>codenewbie</category>
    </item>
    <item>
      <title>Reverse  List Slice   (Python3)</title>
      <dc:creator>francnstein</dc:creator>
      <pubDate>Sat, 02 May 2020 23:21:45 +0000</pubDate>
      <link>https://dev.to/francnstein/reverse-list-slice-python3-5678</link>
      <guid>https://dev.to/francnstein/reverse-list-slice-python3-5678</guid>
      <description>&lt;p&gt;squares = [0, 1, 4, 9, 16, 25, 36, 49, 64, 81]&lt;br&gt;
print(squares[::-1])&lt;/p&gt;

&lt;p&gt;[81, 64, 49, 36, 25, 16, 9, 4, 1, 0]&lt;/p&gt;

</description>
    </item>
    <item>
      <title>"assertion"   (python3)</title>
      <dc:creator>francnstein</dc:creator>
      <pubDate>Thu, 30 Apr 2020 17:33:40 +0000</pubDate>
      <link>https://dev.to/francnstein/assertion-python3-1539</link>
      <guid>https://dev.to/francnstein/assertion-python3-1539</guid>
      <description>&lt;p&gt;Assertions&lt;/p&gt;

&lt;p&gt;An assertion is a sanity-check that you can turn on or turn off when you have finished testing the program.&lt;br&gt;
An expression is tested, and if the result comes up false, an exception is raised.&lt;br&gt;
Assertions are carried out through use of the assert statement.&lt;/p&gt;

&lt;p&gt;print(1)&lt;br&gt;
assert 2 + 2 == 4&lt;br&gt;
print(2)&lt;br&gt;
assert 1 + 1 == 3&lt;br&gt;
print(3)&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Some known Exceptions  (python3)</title>
      <dc:creator>francnstein</dc:creator>
      <pubDate>Wed, 29 Apr 2020 18:45:59 +0000</pubDate>
      <link>https://dev.to/francnstein/some-known-exceptions-python3-3nc0</link>
      <guid>https://dev.to/francnstein/some-known-exceptions-python3-3nc0</guid>
      <description>&lt;p&gt;Exceptions&lt;/p&gt;

&lt;p&gt;Different exceptions are raised for different reasons. &lt;br&gt;
Common exceptions:&lt;br&gt;
ImportError: an import fails;&lt;br&gt;
IndexError: a list is indexed with an out-of-range number;&lt;br&gt;
NameError: an unknown variable is used;&lt;br&gt;
SyntaxError: the code can't be parsed properly; &lt;br&gt;
TypeError: a function is called on a value of an inappropriate type;&lt;br&gt;
ValueError: a function is called on a value of the correct type, but with an inappropriate value.&lt;/p&gt;

</description>
      <category>python</category>
    </item>
    <item>
      <title>Modules (Random)  PYTHON3</title>
      <dc:creator>francnstein</dc:creator>
      <pubDate>Wed, 29 Apr 2020 12:10:53 +0000</pubDate>
      <link>https://dev.to/francnstein/modules-random-python3-219i</link>
      <guid>https://dev.to/francnstein/modules-random-python3-219i</guid>
      <description>&lt;p&gt;Modules are pieces of code that other people have written to fulfill common tasks, such as generating random numbers, performing mathematical operations, etc.&lt;/p&gt;

&lt;h1&gt;
  
  
  random selects random numbers in this case 1-20
&lt;/h1&gt;

&lt;p&gt;import random&lt;br&gt;
for i in range(20):&lt;br&gt;
        value = random.randint(1,20)&lt;br&gt;
        print(value)&lt;/p&gt;

</description>
      <category>python</category>
    </item>
    <item>
      <title>"function take an argument" (PYTHON3)</title>
      <dc:creator>francnstein</dc:creator>
      <pubDate>Mon, 27 Apr 2020 00:23:03 +0000</pubDate>
      <link>https://dev.to/francnstein/function-take-an-argument-python3-11ll</link>
      <guid>https://dev.to/francnstein/function-take-an-argument-python3-11ll</guid>
      <description>&lt;p&gt;When a function take an argument my intentions are clear :)&lt;/p&gt;

&lt;p&gt;def say_it_loud(word):&lt;br&gt;
    print(word + "!")&lt;/p&gt;

&lt;p&gt;say_it_loud("GET BETTER")&lt;br&gt;
say_it_loud("KEEP CODING")&lt;br&gt;
say_it_loud("HACKING HOLLYWOOD")&lt;/p&gt;

&lt;p&gt;GET BETTER!&lt;br&gt;
KEEP CODING!&lt;br&gt;
HACKING HOLLYWOOD!&lt;/p&gt;

</description>
      <category>python</category>
      <category>codenewbie</category>
      <category>motivation</category>
    </item>
    <item>
      <title>Blockchain dev with PYTHON3</title>
      <dc:creator>francnstein</dc:creator>
      <pubDate>Sat, 25 Apr 2020 03:56:40 +0000</pubDate>
      <link>https://dev.to/francnstein/blockchain-dev-with-python3-29bk</link>
      <guid>https://dev.to/francnstein/blockchain-dev-with-python3-29bk</guid>
      <description>&lt;p&gt;I started working on Blockchain dev with PYTHON. The app below gives you the balance of your Ether. A work in progress, but excited at where this will go.&lt;/p&gt;

&lt;p&gt;"""&lt;br&gt;
from web3 import Web3&lt;/p&gt;

&lt;p&gt;infura_url = '&lt;a href="https://infura.io"&gt;https://infura.io&lt;/a&gt;  info here'&lt;br&gt;
web3 = Web3(Web3.HTTPProvider(infura_url))&lt;/p&gt;

&lt;p&gt;print(web3.isConnected())&lt;/p&gt;

&lt;p&gt;print(web3.eth.blockNumber)&lt;/p&gt;

&lt;p&gt;balance = web3.eth.getBalance('your key here')&lt;/p&gt;

&lt;p&gt;print(web3.fromWei(balance, 'ether'))&lt;/p&gt;

&lt;p&gt;"""&lt;/p&gt;

&lt;p&gt;&lt;a href="https://web3py.readthedocs.io/en/stable/web3.eth.html"&gt;https://web3py.readthedocs.io/en/stable/web3.eth.html&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  FRANCNSTEIN © 2020 | Created 𝗐𝗂𝗍𝗁 ❤
&lt;/h1&gt;

</description>
    </item>
    <item>
      <title>FUNCTIONS(PYTHON3)</title>
      <dc:creator>francnstein</dc:creator>
      <pubDate>Fri, 24 Apr 2020 21:24:28 +0000</pubDate>
      <link>https://dev.to/francnstein/functions-python3-5cj3</link>
      <guid>https://dev.to/francnstein/functions-python3-5cj3</guid>
      <description>&lt;p&gt;You must define functions before they are called, in the same way that you must assign variables before using them.&lt;/p&gt;

&lt;p&gt;def names():&lt;br&gt;
    print('Franc')&lt;br&gt;
    print('Francnstein')&lt;br&gt;
names()&lt;/p&gt;

</description>
      <category>python</category>
      <category>codenewbie</category>
    </item>
    <item>
      <title>SIMPLE CALCULATOR (python3)</title>
      <dc:creator>francnstein</dc:creator>
      <pubDate>Thu, 23 Apr 2020 19:02:28 +0000</pubDate>
      <link>https://dev.to/francnstein/simple-calculator-python3-46k2</link>
      <guid>https://dev.to/francnstein/simple-calculator-python3-46k2</guid>
      <description>&lt;p&gt;I will continue to update this as I add more to it, a simple calculator using while loops if elif else statements. I love this example and can't wait to improve it. &lt;/p&gt;

&lt;h1&gt;
  
  
  You are now using SimpleCalc
&lt;/h1&gt;

&lt;p&gt;print('What would you like to calculate?')&lt;/p&gt;

&lt;p&gt;while True:&lt;br&gt;
    print('Options:')&lt;br&gt;
    print('Enter "add" to add two numbers')&lt;br&gt;
    print('Enter "subtract" to subtract two numbers')&lt;br&gt;
    print('Enter "multiply" to multiply two numbers')&lt;br&gt;
    print('Enter "divide" to divide two numbers')&lt;br&gt;
    print('Enter "quit" to end the program')&lt;br&gt;
    user_input = input(" ")&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;if user_input == "quit":
    break

elif user_input == "add":
    num1 = float(input('Enter a number: '))
    num2 = float(input('Enter another number: '))
    result = str(num1 + num2)
    print('The answer is ' + result)

elif user_input == "subtract":
    num1 = float(input('Enter a number: '))
    num2 = float(input('Enter another number: '))
    result = str(num1 - num2)
    print('The answer is ' + result)

elif user_input == "divide":
    num1 = float(input('Enter a number: '))
    num2 = float(input('Enter another number: '))
    result = str(num1 / num2)
    print('The answer is ' + result)

else:
    print('Unknown input')
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;solo learn&lt;br&gt;
 FRANCNSTEIN © 2020 | Created 𝗐𝗂𝗍𝗁 ❤&lt;/p&gt;

</description>
      <category>python</category>
      <category>codenewbie</category>
    </item>
    <item>
      <title>for loops (python3)</title>
      <dc:creator>francnstein</dc:creator>
      <pubDate>Wed, 22 Apr 2020 19:50:40 +0000</pubDate>
      <link>https://dev.to/francnstein/for-loops-python3-1agk</link>
      <guid>https://dev.to/francnstein/for-loops-python3-1agk</guid>
      <description>&lt;p&gt;The for loop is commonly used to repeat some code a certain number of times. This is done by combining for loops with range objects.&lt;/p&gt;

&lt;h1&gt;
  
  
  ------------------------------
&lt;/h1&gt;

&lt;p&gt;ex.&lt;/p&gt;

&lt;p&gt;for i in range(5):&lt;br&gt;
  print("hello!")&lt;/p&gt;

&lt;h1&gt;
  
  
  ------------------------------
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;Now if you wanted to check if the amount of a specific letter within a string.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;ex2.&lt;/p&gt;

&lt;p&gt;name = 'HEEEELLLLLOO THHERREE'&lt;br&gt;
count = 0&lt;br&gt;
for letter in name:&lt;br&gt;
    if letter == 'E':&lt;br&gt;
        count = count + 1&lt;br&gt;
print(count)&lt;/p&gt;

&lt;p&gt;7&lt;/p&gt;

&lt;p&gt;Note: there are easier ways to count letters within a word through built-in tools such as 'HEEEELLLLLOO THHERREE'.count(‘E’)&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;                                         FRANCNSTEIN © | Created 𝗐𝗂𝗍𝗁 ❤
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

</description>
      <category>python</category>
      <category>codenewbie</category>
    </item>
  </channel>
</rss>
