Teacher worksheet: Build-your-own Valence Finder Subject: Chemistry & Computational Thinking Grades levels



Download 1.38 Mb.
Page6/9
Date23.04.2018
Size1.38 Mb.
#45959
1   2   3   4   5   6   7   8   9
negative valence elements, we need help the program recognize them, too. How many electrons would a negative valence “unhappy” element in this row have in its outer shell? There are several possiblities…v=5, 6 or 7

  • How can we write a conditional if statement to verify any of those possibilities? v>4

    Code it on the next line. Use elif and a : as this is another conditional test in a series. Don’t forget to backspace once to outdent to line up with if v>4:

    And put this on the next line: print "I'm not happy. I have", v," electrons in a eight-possible outer shell. My valence is negative ", 8-v,". I want to get ", 8-v," electrons and when I do I will be more negatively charged"

    Let's think about the last of the three "unhappy" types of elements. It would be happy to lose or gain electrons (which would give it positive OR negative valence)…


    Download 1.38 Mb.

    Share with your friends:
  • 1   2   3   4   5   6   7   8   9




    The database is protected by copyright ©ininet.org 2024
    send message

        Main page