Showing posts with label code. Show all posts
Showing posts with label code. Show all posts

16 February 2021

Code.org

 Code.org

I know I have blogged on this before, but that was ages ago and I have
rediscovered how great this is, with all new versions.



Of course you can do the hour of code in this, but the site has expanded so much.
There are so many brilliant things that you can do.
There is a learning path for Junior, Middle and High Schools.
There are complete teacher solutions with lesson plans, differentiated leaning,
student assessment and even professional learning spaces.

I am so impressed with this and I cannot believe that this is all FREE!


#MIEExpert  #MSFTEdu #technology #edtech #MIEExpert #TeachersMatter #coding #hourofcode #code #programming #code.org

08 February 2018

Guide to Python

Guide to Python


The Ultimate guide to Python programming document.
This is all the things you need to be able to complete your
GCSE programming.


How to create a quiz using Python Programming language

How to create a quiz using Python Programming language


There is a structure to when you write code.
We first lists the steps, then we write the code.

Let us look at the structure for when you create a Quiz

Let us look at the structure of the file first.

The basic layout of the quiz
1.User input basic information and save them in file
2.User choose topic to test
3.Start test
4. Get results

Part 1
Input the basic information
Read the input information
save in the file

We can define 2 functions at this point

def read_user_info():
userInfo = input(Enter your name:")
Add some rules here
write_file(filename, content)

def write_file(filename, content):
with open(filename, "a+") as f:
f.write(content)

User choose topic to test
Start test

Here is we need Merge our topics maths() and history() computing()

The structure of those two functions:
1.open file
#maths
with open("maths.txt","r") as topic1:
...
#history
with open("history.txt","r") as topic2:
...

2.user choose difficulty level
#maths
difficultyLevel = input("Please select a difficulty \
level for the  maths quiz:easy, medium or hard:")
...
#history
difficultyLevel = input("Please select a difficulty \
level for the  history quiz:easy, medium or hard:")
...

3.user answer questions / recode score

#maths
if difficultyLevel == "Easy" or difficultyLevel == "easy": 
    for x in range(0,3):
        print(questionsForMaths[x].rstrip()) 
    userAnswer = input("Choose from the following:").lower()
    if userAnswer == questionsForMaths[1].rstrip():
        print ("correct")
        score = score + 1 
    else:
        print ("incorrect")
    ....
    (other 4 questions)
 ...
 (other difficulty level)

#history
if difficultyLevel == "Easy" or difficultyLevel == "easy":
   for y in range(0,3):
       print(questionsForHistory[y].rstrip()) 
   userAnswer2 = input("Choose from the following:")
   if userAnswer2 == questionsForHistory[2].rstrip():
       print("correct")
       score = score + 1
   else:
       print("incorrect")
   ....
   (other 4 questions)
...
(other difficulty level)

4.show result

print("Your total score is", score)
percentage = (score/5)*100
print("The percentage of questions correct is", percentage)
if percentage < 40.0:
...
Thus we can first split it to four functions

def open_file(filename):
...
def choose_difficult_level():
...
def answer_questions(topic,difficultyLevel):
...
def show_result(topic, score,fullUsername):
...

06 December 2017

Microsoft MakeCode for Minecraft on Windows 10

Microsoft MakeCode for Minecraft on Windows 10


Microsoft MakeCode for Minecraft on Windows 10 is now available! 
Students at home and at school now have access to a fun way to learn 
about coding. 
Check out this informative article about how 
Minecraft can prepare students for coding.


#MIEExpert, Microsoft Classroom, #Education, #MSFTEdu‬, #Microsoft

Using Scratch 1.4 for Programming and Control Lesson 6

Using Scratch 1.4 for Programming and Control Lesson 6


A 12 page pdf  with all the instructions on how to use variables.

Lesson 6:
You will understand how to:
 Delete a sprite and import a new sprite
 Draw using the pen feature of Scratch
 Use the pen up and pen down feature
 Change the colour of the pen
 Set the position of the sprite using co-ordinates
 Make a sprite appear and disappear using show and hide
 Add variables to your program to change the direction of movement
 Use the broadcast feature in Scratch to create subroutines
 Use subroutines to saves code and make the program more efficient and
easier to edit
 Enable user input to set the number of sides of each shape

The advantage of colour is that it gives the students the ability to see which 
tab they should be clicked on.



#teachersmatter #SDGs #Varkey Teacher Ambassador 
#MicrosoftEDU #MIEExpert #MSFTEdu #Education #coding

05 December 2017

Using Scratch 1.4 for Programming and Control Lesson 5

Using Scratch 1.4 for Programming and Control Lesson 5


A 14 page pdf booklet on how you can you will use Scratch to draw shapes and 
patterns on the screen and use co-ordinates to set the position of the sprite while drawing.

Lesson 5:
You will understand how to:
 Delete a sprite and import a new sprite
 Draw using the pen feature of scratch
 Use the pen up and pen down feature
 Change the colour of the pen
 Set the position of the sprite using co-ordinates
 Make a sprite appear and disappear using show and hide
 Use the repeat function in Scratch
 Use the broadcast feature in Scratch
 Create simple subroutines


#teachersmatter #SDGs #Varkey Teacher Ambassador 
#MicrosoftEDU #MIEExpert #MSFTEdu #Education #coding

04 December 2017

Using Scratch 1.4 for Programming and Control Lesson 4

Using Scratch 1.4 for Programming and Control Lesson 4



The objective of the game is to collect 10 bananas or more in 20 seconds A

countdown goes from 20 seconds to 0.When the countdown reaches zero a
message will come up saying whether the player has won (10 bananas or more) or
lost (less than 10 bananas collected).

Lesson 4:
You will understand:
 The following key terms – variable, operator, IF..Else…repeat until
 How to give the user instructions at the beginning of the game
 How to use broadcast to start the game
 GREATER THAN and LESS THAN symbols
 BOOLEAN LOGIC as it applies to combining conditions necessary for game outcomes
 Combine different conditions using If…Else.. to govern the game outcome
 How to animate a sprite using costumes
 How to control the movement of a sprite using arrow keys
 How to design a maze on the stage
 How to make sprites interact with the background by using colours
 The range of coordinates available on the stage in Scratch
 How to make sprites start in a pre-set starting position using co-ordinates
 How to make objects to disappear and reappear in a random position


#teachersmatter #SDGs #Varkey Teacher Ambassador
 #MicrosoftEDU #MIEExpert #MSFTEdu #Education #coding

02 December 2017

Using Scratch 1.4 for Programming and Control Lesson 2

Using Scratch 1.4 for Programming and Control 

Lesson 2


This is a 12 page pdf to create a pac man type game

Lesson 2:
Learning Objectives
You will understand how to:
 Delete, resize and draw new sprites
 Draw new costumes and use them to animate a sprite
 Control the movement of a sprite using arrow keys
 Design a maze on the stage
 Make sprites interact with the background by using colours
 Make sprites start in a pre-set starting position using co-ordinates
 Make objects disappear and reappear in a random position
 Create variables to set up scoring in the game
 Make an autonomous sprite chase the sprite controlled by the player


#teachersmatter #SDGs #Varkey Teacher Ambassador
 #MicrosoftEDU #MIEExpert #MSFTEdu #Education #coding

Using Scratch 1.4 for Programming and Control Lesson 1

Using Scratch 1.4 for Programming and Control
Lesson 1


Scratch is a free visual programming language developed by the MIT Media Lab. 
Scratch was created to help young people learn to think creatively, reason systematically
and work collaboratively. 

I have found that some teachers struggle with this, so here is a 16 page book to 
give to students so that they can follow the book and learn how to code.  
All the steps are included.

Lesson 1:
You will understand how to:
 Create a simple script that animates the sprite automatically
 Create a script that allows the user to control the movement of the sprite using
the arrow keys
 Combine the different scripts to work together on the same sprite
 Make the sprite reverse direction
 Edit the stage using the Paint Editor facility within Scratch
 Make the sprite react to the background
 Import a new sprite from the ones available within scratch
 Create and edit new costumes for an existing sprite
 Create a simple script that move the sprite automatically
 Create variables to set the score and the countdown
 Set a sprite to start in a certain position
 Save your work

Have fun!


#teachersmatter #SDGs #Varkey Teacher Ambassador
 #MicrosoftEDU #MIEExpert #MSFTEdu #Education #coding

03 February 2016

Could YOU crack this code to land yourself a job?

Could YOU crack this code to land yourself a job?


Could YOU crack this code to land yourself a job? 
Recruiter releases first ever advert written entirely in computer language.

A new London-based website called Woto has a job listing written in code
It claims to be the first ever advert for employment of the sort
Applicants will need to crack the programming language in order to apply
The move is designed to highlight the growing important of coding in the UK, with schools now adding coding to their curriculum
Woto is a blogging site that lets people share content on custom-built pages

Do you know your ‘if’ statements from your ‘for’ loops?
If so, you might have a shot at the world’s first job advert written entirely in code.
Created by London-based Woto, the advert is looking for a creative designer to join the company - but they’ll need to be adept at coding to apply.

Speaking to MailOnline, Sophie Kurta from Sense Communications, 
who is handling the launch of the site, said there was a possibility more such 
job listings may go live in future as it is a ‘fun way of doing job adverts.’
She explained that as coding in schools in the UK is becoming a bigger issue, 
with it now on the curriculum for primary and secondary school pupils, 
the advert was seen as a good way to keep up with the times.

Excellent!!

#Microsoft Educator Network #MIEExpert15 #MSFTEduE2 #MSFTEdu #technology 
#edtech #MIEExpert 

Microsoft Imagine Access

Microsoft Imagine Access


Coding has become really big all around the world.
Microsoft has a range of different Free applications that you can use
from beginners learning to code to advanced.


This is all available from the Microsoft Virtual Academy

#Microsoft Educator Network #MIEExpert15 #MSFTEduE2 #MSFTEdu #technology 
#edtech #MIEExpert