Hint idea 2 Split into shorter tasks like this.

Slides:



Advertisements
Similar presentations
Top-Down Design CSC 161: The Art of Programming Prof. Henry Kautz 9/16/2009.
Advertisements

Algorithms. Software Development Method 1.Specify the problem requirements 2.Analyze the problem 3.Design the algorithm to solve the problem 4.Implement.
JavaScript with Input & Output Step 1: Use tags JavaScript Template.
CS 0004 –Lecture 8 Jan 24, 2011 Roxana Gheorghiu.
THE BIG PICTURE. How does JavaScript interact with the browser?
Mastering Char to ASCII AND DOING MORE RELATED STRING MANIPULATION Why VB.Net ?  The Language resembles Pseudocode - good for teaching and learning fundamentals.
Hardware vs Software Hardware: A physical part of the computer which you can touch. Software: A set of instructions which is run to perform tasks on your.
Python Programming Using Variables and input. Objectives We’re learning to build functions and to use inputs and outputs. Outcomes Build a function Use.
Python Repetition. We use repetition to prevent typing the same code out many times and to make our code more efficient. FOR is used when you know how.
What have we learned?. What is a database? An organized collection of related data.
1 Computer Science of Graphics and Games MONT 105S, Spring 2009 Session 1 Simple Python Programs Using Print, Variables, Input.
Graphical User Interface You will be used to using programs that have a graphical user interface (GUI). So far you have been writing programs that have.
Advanced Work with Embedded and Summative Assessment Dr. Steve Broskoske Misericordia University EDU 533 Computer-based Education.
Make a dice challenge! This is a starter activity and should take 5 minutes [ slide 1 ] 1.Log in to your computer 2.Open IDLE 3.Copy the code below in.
My Python Programmes NAME:.
Week 4 : Function with parameters and return values.
File Handling in QBASIC
More Sequences. Review: String Sequences  Strings are sequences of characters so we can: Use an index to refer to an individual character: Use slices.
Creating a mystic meg program A simple program asking the user questions and using their answers to build up a fortune telling in a list.
1 Project 3 String Methods. Project 3: String Methods Write a program to do the following string manipulations: Prompt the user to enter a phrase and.
GCSE Computing: Programming GCSE Programming Remembering Python.
Introduction to Programming Python Lab 7: if Statement 19 February PythonLab7 lecture slides.ppt Ping Brennan
For Loop GCSE Computer Science – Python. For Loop The for loop iterates over the items in a sequence, which can be a string or a list (we will discuss.
Controlling Program Structures. Big Picture We are learning how to use structures to control the flow of our programs Last week we looked at If statements.
Part 1 Learning Objectives To understand that variables are a temporary named location to store data and that programmers work with different data types.
1 Sections 3.3 – 3.4 Terminal I/O and Comments Fundamentals of Java: AP Computer Science Essentials, 4th Edition Lambert / Osborne.
PYTHON PROGRAMMING Year 9. Objective and Outcome Teaching Objective Today we will look at conditional statements in order to understand how programs can.
Starter What does the following code do?
Writing algorithms Introduction to Python.
Python 23 Mr. Husch.
Exercise : Write a program that print the final price of purchase at a store where everything costs exactly one dollar. Ask for the number of items purchased.
Introducing Instructions
IF statements.
Introduction to Programming
Lesson 3 - Repetition.
For Monday Read WebCT quiz 18.
Python I/O.
Introduction to Programming
Use proper case (ie Caps for the beginnings of words)
For -G7 programing language Teacher / Shamsa Hassan Alhassouni.
Programming In Lesson 3.
Scratch: selection / branching/ if / If…else / compound conditionals / error trapping by Mr. Clausen.
File Handling.
4.1 Strings ASCII & Processing Strings with the Functions
Introduction to Programming
Module 4 Loops.
Class Examples.
Superhero Quiz Year 9 Python.
Writing Functions( ) (Part 4)
Suppose I want to add all the even integers from 1 to 100 (inclusive)
PYTHON: BUILDING BLOCKS Inputs & Outputs
See requirements for practice program on next slide.
Programming Concepts and Database
Python Basics with Jupyter Notebook
7 – Variables, Input and Output
Small Basic Programming
Introduction to Python
Introduction to Programming
Basic Mr. Husch.
Dry Run Fix it Write a program
Programming Concepts and Database
What you need to do… Drag the pieces of code into the correct order like you can see in the EXAMPLE below. print ( “ int input ) = + Hello world chr ord.
Python SAT 1 Feedback.
GCSE Computing Mini Assignment.
CMPT 120 Lecture 4 – Unit 1 – Chatbots
GCSE Computing.
GCSE Computing.
Year 8 Computer Science Digital Portfolio
Challenge Guide Grade Code Type Slides
Presentation transcript:

Hint idea 2 Split into shorter tasks like this. Ask the user what level they want to play, collect and store the new input as “e”, “m”, or “h”. 2. Add the following code to catch any input we do not want the user to enter While level ! = “e” and level !=“m” and level !=“h”: Level = input(“Sorry. You must type in one of the letters ‘e’, ‘m’ or ‘h’\ne/m/h:”) 3. Use if, elif and else to sort out the upper limit and store the result in a suitable variable. 4. Move the code where the computer thinks of a number, to below this section and insert your upper limit variable in place of the appropriate argument. 5. Adjust the print () function below the # Start the game comment so that it outputs the correct information. 6. Adjust the code so that the output looks nice.