Presentation is loading. Please wait.

Presentation is loading. Please wait.

End of unit assessment Challenge 1 & 2. Course summary So far in this course you have learnt about and used: Syntax Output to screen (PRINT) Variables.

Similar presentations


Presentation on theme: "End of unit assessment Challenge 1 & 2. Course summary So far in this course you have learnt about and used: Syntax Output to screen (PRINT) Variables."— Presentation transcript:

1 End of unit assessment Challenge 1 & 2

2 Course summary So far in this course you have learnt about and used: Syntax Output to screen (PRINT) Variables User input (INPUT) Strings & lists Conditional statement (IF) Loops (FOR/WHILE) Functions Level 2 - (Beginner) Does not combine lines of code (single line only) Can use variables, user input & print Some syntax errors exist Level 3 - (Beginner) Combines multiple lines of working code (some support) Can use variables, user input, print Some syntax errors exist Can describe what program does Level 4 - (Intermediate) Combines multiple lines of working code (no support) Can use variables/lists, user input, print, loops No syntax errors Can describe what program does Level 5 – (Advanced) Combines multiple lines of working code (no support) Can use variables/lists, user input, print, loops, if No syntax errors Can describe what program does and give Line by line code comments Level 6 – (Advanced+) Combines multiple lines of working code (no support) Can use variables/lists, user input, print, loops, if, functions No syntax errors Can describe what program does and give line-by-line code comments Code is added to validate user input

3 Challenge 1: Beginner: (Input, Variable, Print) Create a program that requests 5 numbers from the user and stores them each in separate variables. Once all the numbers have been collected in the program will then output/print all the numbers to the screen. Intermediate: (Loop, Input, List, Print) Create a program that uses a loop to request 5 numbers from the user and stores them all in a list. Once all the numbers have been collected in the program will then output/print all the numbers to the screen. Advanced: ( Loop, Input, List, Print, If) Create a program that uses a loop to request numbers from the user and stores them in a list. The loop will repeat until the number 10 is entered at which point it will exit the loop and output/print all the numbers that have been entered to the screen. Advanced+: ( Loop, Input, List, Print, If, Function) Create a function that is passed an integer number ‘N’ The function will loop to request numbers from the user and stores them in a list. The loop will repeat until ‘N’ is entered at which point it will exit the loop and output/print all the numbers that have been entered to the screen.

4 Challenge (Input, Variable, Print) Create a program that requests from the user and stores 5 numbers. The numbers should be stored in separate variables and then output to the screen. Pseudo-code Collect first number Store first number in variable Collect second number Store second number in variable Collect third number Store third number in variable Collect fourth number Store fourth number in variable Collect fifth number Store fifth number in variable Print first variable Print second variable Print third variable Print fourth variable Print fifth variable Challenge 1 – Beginner help: Reminder: To collect and store a user input (String) VariableName = input(“Prompt”) To collect and store a user input (Integer) VariableName = int(input(“Prompt”)) To output/print to the screen print(VariableName) print(‘Example text’) print(‘Example text %s’ % VariableName)

5 Challenge 2: Beginner: (Input, Variable, Print) Create a program that collects in 1 number and stores it as an integer. The program will then double the number in var1 and output/print it to the screen. Intermediate: (Input, Variable, Print, Loop) Create a program that collects a number from user and stores it in Var1. Print Var1 to the screen and then start a loop that runs 5 times. For each loop the program will load Var1, double it and save it in to Var1 and then output/print to the screen. Advanced: (Input, Variable, Print, Loop) Create a program that collects a number from user and stores it in Var1. The program will then collect a second number from the user and store it in Var2. A loop will then run for the number of times stored in Var2. For each loop the program will load Var1, double it and save it in Var1 and then output/print to the screen. Advanced+: (Input, Variable, Print, Loop, Function) Create a function that collects a number from user and stores it in Var1. The function will then collect a second number from the user and store it in Var2. A loop will then run for the number of times stored in Var2. For each loop the function will load Var1, double it and save it in Var1 and then output/print to the screen.

6 Challenge (Input, Variable, Print) Create a program that collects in 1 number and stores it as an integer. The program will then double the number in var1 and output/print it to the screen. Pseudo-code Collect number from user Store number from user in Var1 Double number Store number in Var1 Output/Print Var1 to screen Challenge 2 – Beginner help: Reminder: To collect and store a user input (String) VariableName = input(“Prompt”) To collect and store a user input (Integer) VariableName = int(input(“Prompt”)) To output/print to the screen print(VariableName) print(‘Example text’) print(‘Example text %s’ % VariableName)

7 Challenge 3: The open/free-for-all challenge! Create a program of your choice that uses: Output to screen (PRINT) Variables User input (INPUT) Strings & lists Conditional statement (IF) Loops (FOR/WHILE) Functions Don’t forget to comment each line of code!


Download ppt "End of unit assessment Challenge 1 & 2. Course summary So far in this course you have learnt about and used: Syntax Output to screen (PRINT) Variables."

Similar presentations


Ads by Google