Use var when the value may change:
varname="Emily"name="Luoming"
Use let when the value will not change:
letschool="NYU"
When possible, use let because it makes the code safer.
A String stores text:
letproject="ASCII Leaf"
A multiline string uses three quotation marks:
letintroduction="""Hello!This is my project."""
Useful String functions:
print(project.count)print(project.uppercased())print(project.hasPrefix("ASCII"))
An Int stores a whole number:
letage=23varscore=10score+=5
Underscores can make large numbers easier to read:
letpopulation=8_000_000