Skip to main content
CS Teaching Tips

Main navigation

  • Browse All Tips
  • Tags
  • 3D
  • About
  • Rate Tips
  • Tip Sheets

Remind students to match types on both sides of the equations because they often try to combine types when creating variables.

Share Remind students to match types on both sides of the equations because they often try to combine types when creating variables. with FacebookShare Remind students to match types on both sides of the equations because they often try to combine types when creating variables. with Twitter
  • Ints need to be equal to ints, and doubles to doubles.
    • A common error occurs when students try to set an int equal to a string.
      • For example, int num = "2.5";
    • This stems from not fully understanding that the type on the left of an equation has to equal the type on the right of the equation.

More about this tip

Tags

  • CS 1
  • Intro Programming
  • Programming Concepts
  • Content Misconceptions
External Source

Interview with Dani McAvoy

Other Tips By
Other Tips By Dani McAvoy

Similar tips

As a final project, have students create a generic side-scrolling game in Java so they can creatively showcase their object-oriented programming abilities.
Misconception: students forget about language-specific or paradigm-specific material (e.g., new/delete or types) when they switch between languages that don’t use the same concepts.
Install the offline editor on student machines in your Scratch course in case the online editor is not available.
  • CSTT Facebook
  • CSTT Twitter

For more information or to report a bug, contact us at admin@csteachingtips.org. Built with Bootstrap. Footer Icons by Mohammed Alyousfi. Powered by Drupal.

Privacy Policy

  • National Science Foundation
  • Sage Fox Group
  • Harvey Mudd College