Commit 46086b23 by Mihai

Switch some examples to python3

parent 2b90450d
 ... ... @@ -8,4 +8,4 @@ def calc_gc_percent(seq): return gc_count * 100.0 / (gc_count + at_count) print "The sequence 'CAGG' has a %GC of {:.2f}".format(calc_gc_percent("CAGG")) print("The sequence 'CAGG' has a %GC of {:.2f}".format(calc_gc_percent("CAGG")))
 ... ... @@ -10,4 +10,4 @@ def calc_gc_percent(seq): return gc_count * 100.0 / (gc_count + at_count) print "The sequence 'CAGG' has a %GC of {:.2f}".format(calc_gc_percent("CAGG")) print("The sequence 'CAGG' has a %GC of {:.2f}".format(calc_gc_percent("CAGG")))
 ... ... @@ -13,4 +13,4 @@ def calc_gc_percent(seq): return gc_count * 100.0 / (gc_count + at_count) input_seq = sys.argv[1] print "The sequence '{}' has a %GC of {:.2f}".format(input_seq, calc_gc_percent(input_seq)) print("The sequence '{}' has a %GC of {:.2f}".format(input_seq, calc_gc_percent(input_seq)))
 ... ... @@ -13,4 +13,4 @@ def calc_gc_percent(seq): return gc_count * 100.0 / (gc_count + at_count) input_seq = sys.argv[1] print "The sequence '{}' has a %GC of {:.2f}".format(input_seq, calc_gc_percent(input_seq)) print("The sequence '{}' has a %GC of {:.2f}".format(input_seq, calc_gc_percent(input_seq)))
 ... ... @@ -25,4 +25,4 @@ def calc_gc_percent(seq): return gc_count * 100.0 / (gc_count + at_count) input_seq = sys.argv[1] print "The sequence '{}' has a %GC of {:.2f}".format(input_seq, calc_gc_percent(input_seq)) print("The sequence '{}' has a %GC of {:.2f}".format(input_seq, calc_gc_percent(input_seq)))
 ... ... @@ -28,4 +28,4 @@ def calc_gc_percent(seq): return gc_count * 100.0 / (gc_count + at_count) input_seq = sys.argv[1] print "The sequence '{}' has a %GC of {:.2f}".format(input_seq, calc_gc_percent(input_seq)) print("The sequence '{}' has a %GC of {:.2f}".format(input_seq, calc_gc_percent(input_seq)))
 ... ... @@ -32,4 +32,4 @@ def calc_gc_percent(seq): return 0.0 input_seq = sys.argv[1] print "The sequence '{}' has a %GC of {:.2f}".format(input_seq, calc_gc_percent(input_seq)) print("The sequence '{}' has a %GC of {:.2f}".format(input_seq, calc_gc_percent(input_seq)))
 ... ... @@ -33,4 +33,4 @@ def calc_gc_percent(seq): if __name__ == '__main__': input_seq = sys.argv[1] print "The sequence '{}' has a %GC of {:.2f}".format(input_seq, calc_gc_percent(input_seq)) print("The sequence '{}' has a %GC of {:.2f}".format(input_seq, calc_gc_percent(input_seq)))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!