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.

Slides:



Advertisements
Similar presentations
SCRATCH Lesson Two – Interactive Concepts Using Sensing, Operators, and Variables.
Advertisements

EasyGUI “Probably the Easiest GUI in the world”. Assumptions (Teachers’ Notes) This resources sets out an introduction to using easyGUI and Python
Summer 2012 Instructor: Hassan Khosravi
ECS 15 if and random. Topic  Testing user input using if statements  Truth and falsehood in Python  Getting random numbers.
Python November 18, Unit 7. So Far We can get user input We can create variables We can convert values from one type to another using functions We can.
An intro to programming concepts with Scratch Session 2 of 10 sessions I/O, variables, simple computing.
Adding Interactivity to Web Pages Brian Mulligan Institute of Technology Sligo.
Computing Theory: BBC Basic Coding Year 11. Lesson Objective You will: Be able to define what BBC basic is Be able to annotate BBC basic code Be able.
Madlib-Input, Strings, and Lists in Scratch Barb Ericson Georgia Tech June 2011.
The Scratch Calculator You are all going to be real computer programmers!!!
Adding JavaScript (<script tag>)
Hands on Projects Dr. Bernard Chen Ph.D. University of Central Arkansas July 9 th 2012
Machine level architecture Computer Architecture Basic units of a Simple Computer.
ECS 10 10/8. Outline Announcements Homework 2 questions Boolean expressions If/else statements State variables and avoiding sys.exit(…) Example: Coin.
Instructor: Chris Trenkov Hands-on Course Python for Absolute Beginners (Spring 2015) Class #002 (January 17, 2015)
Instructor: Chris Trenkov Hands-on Course Python for Absolute Beginners (Spring 2015) Class #005 (April somthin, 2015)
HTML FORMS GET/POST METHODS. HTML FORMS HTML Forms HTML forms are used to pass data to a server. A form can contain input elements like text fields, checkboxes,
Scratch Programming Lesson 4 Question asking and answering.
PPT 4. Variables: (assignment)  A variable: holds a value.  A space in RAM we give a name to  A lot like parameters, only we create them within the.
Python Mini-Course University of Oklahoma Department of Psychology Day 2 – Lesson 7 Conditionals and Loops 4/18/09 Python Mini-Course: Day 2 - Lesson 7.
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:.
Decision Structures, String Comparison, Nested Structures
ITEC 109 Lecture 11 While loops. while loops Review Choices –1 st –2 nd to ?th –Last What happens if you only use ifs? Can you have just an else by itself?
Introduction to Perl NICOLE VECERE. Background General Purpose Language ◦ Procedural, Functional, and Object-oriented Developed for text manipulation.
Using variable Variables are used to store values.
PROGRAMMING IN PYTHON LETS LEARN SOME CODE TOGETHER!
Lesson 1. Security At the menu bar at the top you will see the word Tools. Click your mouse on Tools scroll down to Macro. Move the Mouse over and down.
Python Lesson 1 1. Starter Create the following Excel spreadsheet and complete the calculations using formulae: 2 Add A1 and B1 A2 minus B2 A3 times B3.
Midterm Exam Topics (Prof. Chang's section) CMSC 201.
Shell script – part 2 CS 302. Special shell variable $0.. $9  Positional parameters or command line arguments  For example, a script myscript take 2.
ITEC 109 Lecture 10 More on Repetition / Choices.
1.3. ABSOLUTE VALUE EQUATIONS DAY TWO College Algebra.
Magic 8 ball. "Design and write a python program that emulates a Magic Eight Ball. Your program should continually prompt the user to enter a question.
Object Oriented Programming (OOP) LAB # 3 TA. Maram & TA. Mubaraka TA. Kholood & TA. Aamal.
Part 1 Learning Objectives To understand that variables are a temporary named location to store data and that programmers work with different data types.
Maths quiz - adding a score KS 2: Work with variables.
Programming Simple Programming Variables.
Bbc microbit Lesson 3 – Temperature hot medium.
Madlib-Input, Strings, and Lists in Scratch
Learning Intention Learning Intention: To develop understanding of variables, data types, and comments in text based programming languages Context: Sequencing.
Using the Stopwatch object
Review.
Example Programs.
Python I/O.
Use proper case (ie Caps for the beginnings of words)
Please use speaker notes for additional information!
Introduction to pseudocode
Validations and Error Handling
An Introduction to Python
We are starting to program with JavaScript
Video list editor BIS1523 – Lecture 24.
Learning about Conditional Selection
For -G7 programing language Teacher / Shamsa Hassan Alhassouni.
Remembering lists of values lists
A look at Small basic The Text Window 2017.
An intro to programming concepts with Scratch
Inputs and Variables Programming Guides.
For use on your feedback page
Python Basics with Jupyter Notebook
Python 10 Mr. Husch.
Hint idea 2 Split into shorter tasks like this.
Module 5 ● Vocabulary 1 a sensing block which will ask whatever question is typed into the block and display an input text box at the bottom.
Cat 1 Cat 2 Cat 3 Cat 4 Cat 5 $100 $100 $100 $100 $100 $200 $200 $200 $200 $200 $300 $300 $300 $300 $300 $400 $400 $400 $400 $400 $500 $500 $500 $500 $500.
Use the ten frames to help solve the problems
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.
CMPT 120 Lecture 4 – Unit 1 – Chatbots
The main Function, introcs Library, and Prompting
Challenge Guide Grade Code Type Slides
Presentation transcript:

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

Step one The first line allows us to use the sleep commands to pause our program The report=[] creates a list to store our fake fortune telling

Step 2:getting the users name The 2 nd line creates a variable called name which will store whatever the user types into the input box The last line ads the name into the list called report

Step 3:telling the user their fortune In the first line we ask a simple question and put the users answer into the variable q1 In the second line we see if the user has put an n inside our variable q1 If they have then we append “you need to avoid cats” to our report list In the fourth line we see if the user has put a y inside our variable q 1

Step 4:telling their fortune this line prints the report list item by item 0 is the users name 1 is the line from if elif else choice