Credit where it is due
Using a library is not cheating. Libraries are written to be used, and the import line shows where the tools come from. The problem starts when you take another person’s work and say it is yours. If a friend, a book or a teacher gives you an idea or a piece of code, ask permission first. Then write a comment that says where it came from and what you changed. Make sure you understand every line, because you may be asked to explain it. Testing it yourself shows that it really works. If you are not sure whether you may use something, ask a teacher or another trusted adult. Honest programmers share ideas, give credit and keep learning.
| Situation | Honest? |
|---|---|
| Using math.ceil after import math | yes, it is a library tool |
| Copying a friend’s whole program and handing it in as yours | no, this is plagiarism |
| Using a friend’s idea, asking first and writing a comment to say so | yes |
| Changing only the name in a copied program | no, it is still copied work |
1# Dice game idea shown by Ms Ito. 2# I changed it to use a die with 8 sides. 3import random 4roll = random.randint(1, 8) 5print("You rolled", roll)
| What you do | Is it honest? | Why |
|---|---|---|
| Ask first, then use a friend’s method and name them in a comment | yes | you have permission and you give credit |
| Copy a classmate’s file at night without asking | no | it is not your work |
| Use random.randint and import random | yes | libraries are meant to be used |
| Copy a whole program from a book and say you wrote it | no | you say it is yours when it is not |
Credit cards (no computer). Write four small ideas on cards, such as “a program that picks a random seat number”, “a program that rounds up buses”, “a program that checks a password length” and “a program that picks a quiz number”. Pretend each one was given to you by a different person, and write that person’s name on the back. Now write the comment line you would put at the top of the program: who gave you the idea, and what you changed. Swap with a partner and check that every comment says who and what. If you have a computer or tablet, add a credit comment to a program you already wrote.
1import math 2print(math.floor(2.7))