Difference between revisions of "Vivek Test Page"

From OpenCircuits
Jump to navigation Jump to search
(Created page with "This is Vivek's Test Page")
 
 
(3 intermediate revisions by one other user not shown)
Line 1: Line 1:
 
This is Vivek's Test Page
 
This is Vivek's Test Page
 +
 +
 +
 +
    ((-3./5.) ** 3 )  *  (  (5./3.) ** 2 )
 +
 +
= example_loop_forever =
 +
<pre>
 +
 +
def example_loop_forever():
 +
 +
    print( """Example of for loop forever - stop with cntrl - c
 +
 +
    """ )
 +
 +
    while True:
 +
        print("condition is true")
 +
 +
 +
</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>

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")