Open Python IDLE
Create a New File and save as Tree.py
Task
1. Create a variable called branches, set it to 12
2. Create a variable called baublesperbranch, set it to 3
3. Create a variable called totalbaubles, set it to 0
4. Create a program that will calculate the total number of baubles on the tree.
5. Modify your program to ask the user to input:
4. Create a program that will calculate the total number of baubles on the tree.
5. Modify your program to ask the user to input:
i) the number of branches ii) the number of baubles per branch
6. Modify your program to include other items.
No comments:
Post a Comment