CS 1301 Recitation 1 8_25

CS 1301 Recitation 1 8_25 - 4.0 is not a float and 4 is not...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
8/25/2011 CS 1301 Recitation #1 Int 4, 2 Float 4.2, 4.0 String (str) “a” Boolean: True, False *True and False must be capitalized. They are also not strings. 4+4.2=8.2 is a float 4+4.0=8.0 is a float “a” + 4 does not work b/c of mismatch “a” + “4” = “a4” “4.0” + “4” = “4.04”
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 4.0 is not a float and 4 is not an integer. A string is a concatenate (series) of characters. A conditional is if and else e.g. if 3>0: print true else: print false A Boolean in computer science is true or false <, >, ==, <=, >= Conditionals are based on Booleans...
View Full Document

Ask a homework question - tutors are online