What's wrong with Easter jokes? They crack you up

Slides:



Advertisements
Similar presentations
Introduction to Eclipse. Start Eclipse Click and then click Eclipse from the menu: Or open a shell and type eclipse after the prompt.
Advertisements

CS0004: Introduction to Programming Repetition – Do Loops.
Loops – While, Do, For Repetition Statements Introduction to Arrays
CS0007: Introduction to Computer Programming Introduction to Arrays.
by Chris Brown under Prof. Susan Rodger Duke University June 2012
The while Loop Syntax while (condition) { statements } As long condition is true, the statements in the while loop execute.
The while Loop Syntax while (condition) { statements } As long condition is true, the statements in the while loop execute.
Chapter 5 Loops.
Structured Programming: Debugging and Practice by the end of this class you should be able to: debug a program using echo printing debug a program using.
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.
Special Methods in Java. Mathematical methods The Math library is extensive, has many methods that you can call to aid you in your programming. Math.pow(double.
Computer Programming Arrays 1. Question #1 2 Question Choose the correct answer..
EECS 183 Discussion #10: I’m actually Alex Trebek. November 15th, 2016
CSC 211 Java I for loops and arrays.
Whatcha doin'? Aims: To start using Python. To understand loops.
Repetition Structures
Arrays: Checkboxes and Textareas
What to do when a test fails
5. Function (2) and Exercises
Chapter 5: Repetition Structures
Psuedo Code.
While Loops in Python.
Agenda Warmup Lesson 2.5 (Ascii, Method Overloading)
Engineering Innovation Center
LOOPS.
Lecture 4B More Repetition Richard Gesick
Reindeer don't go to public school, they’re elf taught.
Subroutines Idea: useful code can be saved and re-used, with different data values Example: Our function to find the largest element of an array might.
While loops The while loop executes the statement over and over as long as the boolean expression is true. The expression is evaluated first, so the statement.
Arrays, For loop While loop Do while loop
Python I/O.
PC02 Term 2 Test Recursion and Sorting. PC02 Term 2 Test Recursion and Sorting.
Use proper case (ie Caps for the beginnings of words)
PC02 Consolidation Loading a witty quote…. PC02 Consolidation Loading a witty quote…
Chapter 6: Repetition Structures
Chapter 5: Repetition Structures
Unit 6 Working with files. Unit 6 Working with files.
<INSERT_WITTY_QUOTE_HERE>
Encryption and Decryption
Topic 1: Problem Solving
We’re moving on to more recap from other programming languages
Coding Concepts (Basics)
Repetition Structures
Do … Loop Until (condition is true)
Chapter 5 Loops Liang, Introduction to Java Programming, Tenth Edition, (c) 2015 Pearson Education, Inc. All rights reserved.
CS150 Introduction to Computer Science 1
Whatcha doin'? Aims: Begin to create GUI applications. Objectives:
CS150 Introduction to Computer Science 1
Arrays.
Examples Example Problems, their Algorithms, and their C Source Code.
Console.WriteLine(“Good luck!”);
The last lesson of this term!
OBJECT ORIENTED PROGRAMMING I LECTURE 11 GEORGE KOUTSOGIANNAKIS
Lets Play with arrays Singh Tripty
Functions continued.
Python Basics with Jupyter Notebook
CHAPTER 21 LOOPS 1.
Fundamental Programming
IPC144 Introduction to Programming Using C Week 4 – Lesson 2
Basic Lessons 5 & 6 Mr. Kalmes.
Arrays & Loops.
Incremental Programming
Arrays & Loops.
Topic: Iterative Statements – Part 2 -> for loop
Primary School Computing
CHAPTER 6 Testing and Debugging.
Module 4 Loops and Repetition 9/19/2019 CSE 1321 Module 4.
Intro to Programming (in JavaScript)
Presentation transcript:

What's wrong with Easter jokes? They crack you up PC01 Term 1 Consolidation What's wrong with Easter jokes? They crack you up

Today we are going to consolidate everything we’ve learnt so far Introduction Today we are going to consolidate everything we’ve learnt so far Feel free to pick any topic you want All work should be done in the same solution

Index For loops Data validation While loops Arrays Problem solving Fixing errors Click me Click me Click me Click me Click me Click me

It should start at 10 and count down to 1 For loops Create a for loop It should start at 10 and count down to 1 Inside the loop, create a string variable and call it text Set it to counter + “ banana” Then, add an if statement It should check if counter is greater than 1 If it is, add “s” to text Print text to the console

Declare an integer variable and call it input Add a do while loop Data validation Declare an integer variable and call it input Add a do while loop It should print “Enter a number” to the console For the condition, use int.TryParse It should accept Console.ReadLine() and out input as parameters Do not forget about the exclamation mark at the front

It should go from 1 up to input (inclusive!) Data validation After the loop, create an integer variable called result and set it to 1 Then, add a for loop It should go from 1 up to input (inclusive!) Every iteration, it should take result and multiply it by the counter Finally, print result to the console Test your program, when you type 5 it should give you 120

Create an infinite loop Inside the loop, create two integer variables While Loops Create an infinite loop Inside the loop, create two integer variables Assign a random number between 1 and 13 to both of them Then, show both numbers to the user and ask them to enter their product Get the product from the console (to save time, you can use Convert.ToInt32 instead of int.TryParse) Break from the loop if the result is correct

Create an array of strings with 5 spaces Arrays Create an array of strings with 5 spaces Use a for loop to ask the user to enter their 5 different movies Add a for loop that shuffles them randomly It should run at least 15 times Every iteration it should pick two random elements and swap them Print the array after that using string.Join()

Create a program that checks if a string is a palindrome Problem solving Create a program that checks if a string is a palindrome A palindrome is a string that reads the same backward as forward, e .g. racecar or level There is more than one way to solve this problem You can reverse the string an then compare it with the original You can compare it character by character (text[0] with text[Length-1], text[1] with text[Length-2] and so on) Use whichever method you like!

Debugging is a vital skill for any programmer Fixing errors Debugging is a vital skill for any programmer It’s time for you to get a bit of practise! Click here: … or type this link: goo.gl/fY5Xm8 You will need to unzip the folder (right click -> Extract all…) and double click on FixMe.sln Download the program

Enjoy your Easter break! That’s it for this term! Enjoy your Easter break!