GROUP 2 SARAH ELEENA MOHD USLI NURUL AIDIL ABD HALIM

Slides:



Advertisements
Similar presentations
Week 5 - Friday.  What did we talk about last time?  Repetition  while loops.
Advertisements

BACS 287 Programming Logic 3. BACS 287 Iteration Constructs Iteration constructs are used when you want to execute a segment of code several times. In.
Defining Control Structures
Chapter 2: Beginning the Problem-Solving Process
Control Structures II Repetition (Loops). Why Is Repetition Needed? How can you solve the following problem: What is the sum of all the numbers from 1.
Simple Quiz Assessment David Yan Under the direction of Susan Rodger Duke University June 2015.
COSC 1306—COMPUTER SCIENCE AND PROGRAMMING PYTHON BRANCHES AND LOOPS Jehan-François Pâris
Hello and welcome to who wants to be a Millionaire! On this game you will be asked 15 questions. It will then come up with 4 possible answers, 1 of which.
Conditional Loops CSIS 1595: Fundamentals of Programming and Problem Solving 1.
Designing While Loops CSIS 1595: Fundamentals of Programming and Problem Solving 1.
PROGRAMMING IN PYTHON LETS LEARN SOME CODE TOGETHER!
LESSON PLAN Siti Hajar binti Ibrahim Fatin Hanani Mat Radzi Nurul Farhana Mohd Salim
More Sequences. Review: String Sequences  Strings are sequences of characters so we can: Use an index to refer to an individual character: Use slices.
An Introduction to Programming with C++1 Beginning the Problem- Solving Process Tutorial 2.
Algorithms and Flowcharts
Programming Assignment 4: HTML Table and PHP Array.
GCSE COMPUTER SCIENCE Practical Programming using Python
Special Triangles Review
Lesson Objectives Aims To be able to write an algorithm in Pseudo Code
A451 Theory – 7 Programming 7A, B - Algorithms.
Dice Game Pseudocode Module main() Declare String reply
Entry Ticket: Algorithms and Program Construction
Week of 12/12/16 Test Review.
Lesson 3 - Repetition.
6 Figure Grid Map skills Quiz Reference Quiz
Python - Iteration Iteration
Repetition-Sentinel,Flag Loop/Do_While
Instructions: Teacher | Student
MDD 310 Enthusiastic Studysnaptutorial.com
Objective of the lesson
Java Finish command line guessing game, then….
Learning to Program in Python
Print slides for students reference
Writing Functions( ) (Part 5)
Repetition Chapter 6 12/06/16 & 12/07/16 1 1
Binary Files.
Thinking Like a Scientist
Part 10 Q46 to Q50 of National 5 Prelim
exa.im/stempy16.files - Session 12 Python Camp
Learning to Program in Python
Standard Algorithms Input validation Finding the minimum
Introduction to pseudocode
Introduction to Programming
Exception Handling.
More Loops.
For -G7 programing language Teacher / Shamsa Hassan Alhassouni.
Higher Computing Using Loops.
Correct Order Correct Order is a game we like to use to reinforce the correct sequence or flow of a process. Use this game when a process or sequence being.
flow charts and system diagrams
Do While (condition is true) … Loop
Introduction to TouchDevelop
IST256 : Applications Programming for Information Systems
Order of Operations.
Intro to Computer Science CS1510 Dr. Sarah Diesburg
Writing Functions( ) (Part 4)
Starter answer these questions in your book
Quiz Name Here Click to start.
Programs. at the code at the site..
Reviewgamezone.com Go online to reviewgamezone.com and on the right (or scroll down to) where it says “Games By ID#” type in & Then scroll.
Reviewgamezone.com Go online to reviewgamezone.com and on the right (or scroll down to) where it says “Games By ID#” type in 4274 or Then scroll.
Counting to
Multiplying By 3 Third Grade.
How can you make a guessing game?
Just Basic Lessons 9 Mr. Kalmes.
Text / Serial / Sequential Files
This shows running the first guess number program which only allows one guess - I show the correct answer for testing purposes.
Print a list of all people in department 15 who either are salaried and make more than or are part time or full time and make more than 25 per hour.
Week 5 - Friday CS 121.
Programming Fundamental
Presentation transcript:

GROUP 2 SARAH ELEENA MOHD USLI NURUL AIDIL ABD HALIM NOOR SALBANIAH JALALUDDIN SITI FARAH SHAMSUDDIN RAFIQQAH MUHAMAD SABRI SITI ZALIHAR ABD MUTALIB

QUESTION 2 Write a program for a guessing game. The program will randomly select a number between 1 and 100. The user is asked to guess a number. - if the guess is higher, print “The number is higher than that. Try again !” or other related msg. - if the guess is lower, print “The number is lower than that. Try again !” or other related msg. - if the guess is correct, print “Congratulation! You guess it correctly !” or other related msg. If the user guessed wrongly for 10 times, the game ends with “game over!” or other related msg. If the user is able to guess the number correctly, asks for the user’s name and store it in a file. The name will be displayed each time the program starts.

PSEUDOCODE OPEN FILE ‘mz1’ READ RECENT WINNER’S NAME CLOSE FILE GET FIRST GUESSING NUMBER LOOP FROM 1 TO 9 AS ‘W’ IF i != r , EXIT IF i > r ,PRINT NUMBER IS HIGH IF i < r ,PRINT NUMBER IS LOW IF i == r , PRINT CONGRATULATIONS GET WINNER’S NAME APPEND WINNERS NAME END LOOP

FLOW CHART