Code Circle
  • Home
  • Team
    • Admin Team
    • Board of Directors
  • Join Us
    • Teach A Course
    • Become A Partner
  • Partners
  • Programs
    • App Design & Development
    • Python Course >
      • Python Course Week 1: Introduction >
        • Gmail Account Setup
        • Repl.it Setup
      • Python Course Week 2: Numbers (Ints and Doubles) >
        • Variables
        • Integers
        • Integer Operations
        • Doubles
        • Summary
        • Python Ints Quiz
      • Python Course Week 3: Strings >
        • Printing, Assigning, and Concatentating
        • Converting With Strings
        • Indexing
        • Summary
        • Strings Cheat Sheet
        • Strings Error Log
        • Python Strings Quiz
      • Python Course Week 4: Booleans >
        • Practicality
        • Comparisons
        • Logical Statements
        • Summary
        • Error Log
        • Boolean Quiz
        • Mid-Course Survey
      • Python Course Week 5: Conditional Statements >
        • If Statements
        • Else/Else If Statements
        • While Loops
        • If Statement Logic
        • Summary
        • Cheat Sheet: Conditions
        • Conditionals Error Log
        • Quiz: Conditional Statements
      • Python Course Week 6: For Loops >
        • For Loops
        • For Loops Syntax
        • Loop Errors
        • Summary
        • Using Loops in Problems
        • Quiz: For Loops
      • Python Course Week 7: Lists >
        • Functions
        • Iterating Through A Loop
        • Summary
        • Error Log
        • Quiz: Lists
      • Python Course Week 8: Functions and Programs >
        • All About Functions
        • All About Programs
        • Post-Course Quiz
        • Python Course Final Project
    • Global Ambassadors

Summary

Click to set custom HTML

Variables

  • Variables are used to name an object reference.
  • The variable name is the map that directs the program to the object. This is known as the object reference.
  • Variable names are usually written in snake_case to make it easier to read.
Picture

Ints

  • This week, we focused on two types of variables: int and double.
  • Ints are a type of variable.
  • They store numbers that are not fractions or decimals.
Picture

Doubles

  • Doubles are another type of numerical variables
  • They store numbers that are fractions or decimals.
Picture

Differences Between an Int and a Double

  • ints are used for whole numbers only
  • doubles are used for decimal numbers only
  • Remember: Use 2.0 or 1.0 for double only when you want to the result of your program to be a decimal. Otherwise use int for whole numbers

Operations

  • Operations are used in addition to defining a variable.
  • These operations are very useful because you use them every day!
  • EX: + (addition) , - (subtraction), * multiplication
  • The computer is so smart that it can perform these operations like a calculator that you use in school.
  • Here is are examples that can be used in Python:
Picture
Picture
previous
continue with week 2
Powered by Create your own unique website with customizable templates.
  • Home
  • Team
    • Admin Team
    • Board of Directors
  • Join Us
    • Teach A Course
    • Become A Partner
  • Partners
  • Programs
    • App Design & Development
    • Python Course >
      • Python Course Week 1: Introduction >
        • Gmail Account Setup
        • Repl.it Setup
      • Python Course Week 2: Numbers (Ints and Doubles) >
        • Variables
        • Integers
        • Integer Operations
        • Doubles
        • Summary
        • Python Ints Quiz
      • Python Course Week 3: Strings >
        • Printing, Assigning, and Concatentating
        • Converting With Strings
        • Indexing
        • Summary
        • Strings Cheat Sheet
        • Strings Error Log
        • Python Strings Quiz
      • Python Course Week 4: Booleans >
        • Practicality
        • Comparisons
        • Logical Statements
        • Summary
        • Error Log
        • Boolean Quiz
        • Mid-Course Survey
      • Python Course Week 5: Conditional Statements >
        • If Statements
        • Else/Else If Statements
        • While Loops
        • If Statement Logic
        • Summary
        • Cheat Sheet: Conditions
        • Conditionals Error Log
        • Quiz: Conditional Statements
      • Python Course Week 6: For Loops >
        • For Loops
        • For Loops Syntax
        • Loop Errors
        • Summary
        • Using Loops in Problems
        • Quiz: For Loops
      • Python Course Week 7: Lists >
        • Functions
        • Iterating Through A Loop
        • Summary
        • Error Log
        • Quiz: Lists
      • Python Course Week 8: Functions and Programs >
        • All About Functions
        • All About Programs
        • Post-Course Quiz
        • Python Course Final Project
    • Global Ambassadors
✕