Hello World - Introduction to coding.pptx

JennyGainsford 252 views 31 slides Mar 21, 2024
Slide 1
Slide 1 of 31
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25
Slide 26
26
Slide 27
27
Slide 28
28
Slide 29
29
Slide 30
30
Slide 31
31

About This Presentation

Hello World - Introduction to coding.pptx


Slide Content

Welcome Please mute when you are not speaking. This session will be recorded. It will be shared on a website behind Herts log-in, accessible to all Herts staff and students. If you do not want for your image to be recorded, please switch off your camera. If you do not want your voice to be recorded, please use the Chat to ask questions and comment. We may not have time to respond to all questions or comments. If you would like to follow-up on a query, please contact the Digital Capabilities team at [email protected]. Enter the Three things I learned challenge.  Submit a graphic or video by 7th April, to share three things you learned during Digital Skills Week, and be entered into the prize draw to win a pair of Bluetooth headphones. Details on the Digital Skills Week website –go.herts.ac.uk/ dsw

Hello World: An Introduction To Coding Facilitated by: Jen Gainsford – Deputy Head of TEL and Digital Capabilities and Joanna Szpunar – Digital Skills Facilitator Contact via Email: [email protected]

Learning Objectives To know the three main programming constructs To be able to write a short program To understand how coding affects our daily lives

Coding can be defined as writing instructions for computers to follow A computer then reads these instructions, or programs, and completes the steps Programs are written in a language that a computer can understand Common programming languages include Python, Java, C, C++, and JavaScript. What is coding?

To solve a problem, you need to break it down into steps This is called an algorithm Imagine you are making a cup of tea. What steps would you take to make it? How code can solve problems

Fill the kettle with water Boil the water in the kettle Put the teabag in the cup Pour boiled water into the cup Add milk to the cup Remove the tea bag Add sugar to the cup Stir the tea How does that compare to how you would make a cup of tea? How code can solve problems

Planning before coding is important. Consider: What ingredients go into a cup of tea? Which ingredients or methods might vary depending on who is drinking the tea? What steps in the process may seem relevant but don’t really matter in terms of the output? Understanding the problem

In a computer program instructions are carried out in order. This is called sequencing . An example of this in the real world is your morning routine What sequence or order might you carry these out in the morning? Three key programming concepts: Sequencing

Selection is where the program asks questions to decide which path to take next Let’s go back to making a cup of tea – what questions might be asked to make the perfect cuppa? Three key programming concepts: Selection

A variable is used to store information It is used for calculations, for storing values for later use, in decisions and in iteration. Variables

Iteration is doing the same thing more than once, sometimes called a loop. Loops can be: condition controlled For example, you would keep adding sugar to a cup of tea until the tea was sweet enough count controlled For example, you would add two teaspoons of sugar into the cup of tea and then stop . Three key programming concepts: Iteration

Programming Languages Have you heard about any of the programming languages?

Formal languages used to write instructions that computers can execute. Means of communication between humans and computers. Enabling programmers to develop software and applications. Each programming language has its own syntax, semantics, and rules for writing code. Tailored to specific programming paradigms and problem-solving approaches. Programming Languages

The field of coding is always changing to keep up with new technology. Some prioritise simplicity and ease of use, while others performance and low-level control. This diversity caters to different developer preferences and project requirements. They are designed to solve different types of problems or cater to different domains. Why there are so many programming languages?

High-level languages: These languages are closer to human language and are designed to be easier for programmers to understand and write. Examples include Python, Java, and JavaScript. Low-level languages: These languages are closer to machine code and provide more direct control over hardware resources. Examples include Assembly language. High-level vs. Low-level

Source: Alimam , M. (2023) 8 Difference between Assembly Language and Machine Language

Python - web development, data analysis, artificial intelligence, automation, scripting. Java - building enterprise-scale applications, Android mobile apps, and web services. C++ - system programming, game development, performance-critical applications, and robotics. SQL - managing and querying relational databases. R - statistical computing, data analysis, data visualisation . Some Commonly Used Languages and Their Applications

HTML : Structure web pages with elements like <header>. Add text, images, videos, links, forms, and tables for content. CSS : Style HTML elements with properties like colours , fonts, and margins. Create responsive layouts for various screen sizes. Enhance user experience with animations and transitions. JavaScript: Add interactivity with event handling (e.g., clicks, mouse movements). The Building Blocks of Web Development

Computers have transformed, becoming smaller, faster, and cheaper, and now ubiquitous in smartphones and household items. Code is vital for creating our daily tech, from communication tools to smart devices. Code silently powers our daily routines, ensuring seamless technology functionality. How code powers our daily lives?

Efficiency: code automates tasks, saving time and reducing manual effort, leading to increased productivity. Accuracy: automated processes ensure consistent and reliable results, especially in critical areas like data analysis. Scalability: code enables easy adjustment of tasks to meet changing demands without manual intervention. Flexibility: processes can be tailored to specific needs, offering greater adaptability and responsiveness to evolving requirements. Some of the Benefits

Practical coding exercise

When testing out a language, we start with a “Hello World” program Go to Trinket.io using this link: https://trinket.io/python/8599e7075e On Line 2, type: print ( “Hello World!” ) Press the button to run your program Let’s get coding…

What is the variable in this program? What do you think will happen when you run it? Try it out: https://trinket.io/python/aa68c02a8f Let’s get coding…

Now you are going to: name your own variable ask a question and store the answer as a variable output a string containing the variable Try it out: https://trinket.io/python/7b65ad1b11 Let’s get coding… Use + to join a string and a variable together / Variable must be lower case and one word (or use _) When asking a question, add a space in the string after ?

This program uses selection to allow a program to branch in a different direction. If the end user answers “green”, what will happen? Try it out: https://trinket.io/python/cb87c6bf16 Let’s get coding…

What is the difference between these uses of the equals sign? Do you notice anything about the alignment of the code? This is called the syntax Learning to code is just like learning any other language and there are rules to follow! Let’s get coding…

Web Development Data Science Software Engineering Game Development Cybersecurity Applications and Job Opportunities

Codecademy A range of coding foundation courses for beginners upwards available for free. Code First Girls Free, part-time coding courses for female and non-binary identifying young individuals across the UK and Ireland. Raspberry Pi Foundation projects Step-by-step instructions to support coding for kids, teenagers and young adults of all ages and skill level LinkedIn Learning: Programming Fundamentals Explore the core concepts and structure of programming languages in this LinkedIn Learning course. Resources

 - Enter the Three things I learned challenge. Submit a graphic or video by 7th April, to share three things you learned during Digital Skills Week, and be entered into the prize draw to win a pair of Bluetooth headphones. Details on the Digital Skills Week website –go.herts.ac.uk/ dsw .  - Session recordings and materials will be shared on the Digital Skills Week Canvas site. You will be sent an email to let you know when this is live.  - You will be sent an email to ask for your feedback about Digital Skills Week . Please do share your thoughts and ideas to enable us to deliver events and activities that are relevant to you.  - Continue your learning on the Digital Skills Week resources page and/or complete the Jisc Digital Discovery tool at go.herts.ac.uk / dsw and ask.herts.ac.uk/digital-skills. What next?
Tags