Difference between revisions of "Vivek Test Page"

From OpenCircuits
Jump to navigation Jump to search
 
(One intermediate revision by one other user not shown)
Line 5: Line 5:
 
     ((-3./5.) ** 3 )  *  (  (5./3.) ** 2 )
 
     ((-3./5.) ** 3 )  *  (  (5./3.) ** 2 )
  
 +
= example_loop_forever =
 
<pre>
 
<pre>
 +
 
def example_loop_forever():
 
def example_loop_forever():
  
Line 16: Line 18:
  
  
 +
</pre>
 +
 +
= Vivek's Example =
 +
 +
<pre>
 +
# put code here
 +
def example_loop_forever():
 +
    for i_test in [True,False,0,1,"false"]:
 +
        print(f"testing{i_test}")
 +
        which is of (type)(i_test)
 +
        if i_test:
 +
              print("true")
 +
        else:
 +
              print("not true")
 
</pre>
 
</pre>

Latest revision as of 06:56, 6 April 2020

This is Vivek's Test Page


    ((-3./5.) ** 3 )  *  (   (5./3.) ** 2 )

example_loop_forever[edit]


def example_loop_forever():

    print( """Example of for loop forever - stop with cntrl - c

    """ )

    while True:
        print("condition is true")


Vivek's Example[edit]

# put code here
def example_loop_forever():
    for i_test in [True,False,0,1,"false"]:
         print(f"testing{i_test}")
         which is of (type)(i_test)
         if i_test:
              print("true")
         else:
              print("not true")