CS 1111 Introduction to Programming Spring 2019

Slides:



Advertisements
Similar presentations
Getting Input in Python Assumes assignment statement, typecasts.
Advertisements

Computing Science Software Design and Development SOFTWARE DESIGN AND DEVELOPMENT USING PYTHON.
CS107 Introduction to Computer Science Lecture 3, 4 An Introduction to Algorithms: Loops.
P1PMF Split1 QBASIC. P1PMF Split2QBasic Command Prompt Will launch the emulator DOS operating system? Press Alt + Enter to display the widescreen.
Today’s topics: I/O (Input/Output). Scribbler Inputs & Outputs  What are the Scribbler’s inputs and outputs?  reset button  motors/wheel  light sensor.
1 9/29/06CS150 Introduction to Computer Science 1 Loops Section Page 255.
1 9/15/06CS150 Introduction to Computer Science 1 Combined Assignments, Relational Operators, and the If Statement.
1 11/3/08CS150 Introduction to Computer Science 1 Reading from and Writing to Files Section 3.12 & 13.1 & 13.5.
CS 106 Introduction to Computer Science I 01 / 29 / 2008 Instructor: Michael Eckmann.
ES 100: Lecture 7 String Functions 1.Log in 2.Open MATLAB 3.Change the current directory and path to U: 4.Change the numeric display to compact (File,
1 10/29/07CS150 Introduction to Computer Science 1 Reading from and Writing to Files Section 3.12 & 13.1 & 13.5.
1 September 6, 2005CS150 Introduction to Computer Science I What Actions Do We Have Part 1 CS150 Introduction to Computer Science I.
Chapter 2 Writing Simple Programs
1 10/25/06CS150 Introduction to Computer Science 1 Reading from and Writing to Files.
Python – Part 4 Conditionals and Recursion. Modulus Operator Yields the remainder when first operand is divided by the second. >>>remainder=7%3 >>>print.
Instructor: Chris Trenkov Hands-on Course Python for Absolute Beginners (Spring 2015) Class #002 (January 17, 2015)
CS31: Introduction to Computer Science I Discussion 1A 4/9/2010 Sungwon Yang
S. Awad, Ph.D. M. Corless, M.S.E.E. E.C.E. Department University of Michigan-Dearborn Introduction to Matlab: User Input / Output Programming Environment.
Type Conversions Implicit Conversion Explicit Conversion.
Lecture 2: Introduction to C Programming. OBJECTIVES In this lecture you will learn:  To use simple input and output statements.  The fundamental data.
Lecture 2: Introduction to C Programming. OBJECTIVES In this lecture you will learn:  To use simple input and output statements.  The fundamental data.
1 Computer Science of Graphics and Games MONT 105S, Spring 2009 Session 1 Simple Python Programs Using Print, Variables, Input.
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.
Lesson 4 Input. JAVA Input JAVA input is not straightforward and is different depending on the JAVA environment that you are using. The reason it is not.
Data Types and Conversions, Input from the Keyboard CS303E: Elements of Computers and Programming.
Data Types and Conversions, Input from the Keyboard If you can't write it down in English, you can't code it. -- Peter Halpern If you lie to the computer,
 2007 Pearson Education, Inc. All rights reserved. A Simple C Program 1 /* ************************************************* *** Program: hello_world.
Simple “VICO” (“VIPO”) Programs (Variables, Input, Calculating or Processing, Output)
Computer Programming 12 Mr. Jean March 5 th, 2014.
CS 101 – Oct. 7 Solving simple problems: create algorithm Structure of solution –Sequence of steps (1,2,3….) –Sometimes we need to make a choice –Sometimes.
Python – Part 4 Conditionals and Recursion. Conditional execution If statement if x>0:# CONDITION print (‘x is positive’) Same structure as function definition.
Input, Output and Variables GCSE Computer Science – Python.
Introduction to Programming
Chapter 2 Writing Simple Programs
Using the Console.
What Actions Do We Have Part 1
Chapter 2 Introduction to C++ Programming
Input and Output Upsorn Praphamontripong CS 1110
Introducing Instructions
Intro to CS Nov 2, 2015.
Data Types and Conversions, Input from the Keyboard
Programming Fundamental
Basic operations in Matlab
Keyboard Input and Screen Display ––––––––––– Interactive Programming
getline() function with companion ignore()
Review.
CSc 110, Spring 2017 Lecture 8: input; if/else
CS 1430: Programming in C++ Turn in your Quiz1-2 No time to cover HiC.
Use proper case (ie Caps for the beginnings of words)
Introduction to C++ Programming
Console input.
Microsoft® Small Basic
Strings A collection of characters taken as a set:
Class Examples.
Input from the Console This video shows how to do CONSOLE input.
Inputs and Variables Programming Guides.
CS150 Introduction to Computer Science 1
CS150 Introduction to Computer Science 1
Exercise Solution First questions What's output What's input
CS150 Introduction to Computer Science 1
Python Basics with Jupyter Notebook
JavaScript: Introduction to Scripting
Python Inputs Mr. Husch.
Processing Devices.
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.
Starter Which of these inventions is: Used most by people in Britain
getline() function with companion ignore()
Python Creating a calculator.
PYTHON - VARIABLES AND OPERATORS
Presentation transcript:

CS 1111 Introduction to Programming Spring 2019 Input and Output CS 1111 Introduction to Programming Spring 2019 [The Coder’s Apprentice, §5.2.4-5.2.5]

Input – Process – Output Example: Get 2 numbers from the user and display the larger number Input Process Output Check if the first number is greater than the second number The first number The larger number The second number input() function print() function

Reading Input from the Keyboard input(prompt) input(“What is your name? ”) Display the string “What is your name? ” on the screen Wait for the user to enter something and press Enter The user’s input is returned as a string name = input(“What is your name? ”) The user’s input is returned as a string and assigned to the variable name