CSE Module 1 A Programming Primer

Slides:



Advertisements
Similar presentations
Enter question text... 1.Enter answer text.... Enter question text... 1.Enter answer text...
Advertisements

Enter question text... 1.Enter answer text.... Enter question text... 1.Enter answer text...
CSE 341, S. Tanimoto Pattern Matching - 1 Pattern Matching in Lisp Lists can be used to represent sentences, relations, tree structures, etc. (this list.
Registration System Version 1.0 Teacher’s User Manual to Enter Midterm Warning. Developed By Ovais Khan
Scripting CBIS BASH Scripting Step 1 – Create the bash file. Usually a good idea to end it in.sh file1.sh Step 2 – Using CHMOD make the bash file.
More on Functions CSE 1310 – Introduction to Computers and Programming Vassilis Athitsos University of Texas at Arlington 1.
Line Continuation, Output Formatting, and Decision Structures CS303E: Elements of Computers and Programming.
Variables and Expressions CMSC 201 Chang (rev )
Python Programming Using Variables and input. Objectives We’re learning to build functions and to use inputs and outputs. Outcomes Build a function Use.
1. Visit 2. Click on
Python The tutorial
1 Computer Science of Graphics and Games MONT 105S, Spring 2009 Session 1 Simple Python Programs Using Print, Variables, Input.
My Python Programmes NAME:.
Variables and Expressions CMSC 201. Today we start Python! Two ways to use python: You can write a program, as a series of instructions in a file, and.
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,
COSC 1223 Computer Science Concepts I Joe Bryan. What is a function? Like a mini-program that performs a specific task Two types: Built-in functions Functions.
Control Structures WHILE Statement Looping. S E Q C E N U E REPITITION …a step or sequence of steps that are repeated until some condition is satisfied.
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.
親愛的吉姆舅舅: 今天吃完晚餐後,奶奶說,在家 裡情況變好以前,您要我搬到城裡跟 您住。奶奶有沒有跟您說,爸爸已經 好久沒有工作,也好久沒有人請媽媽 做衣服了? 我們聽完都哭了,連爸爸也哭了, 但是媽媽說了一個故事讓我們又笑了。 她說:您們小的時候,她曾經被您追 得爬到樹上去,真的嗎? 雖然我個子小,但是我很強壯,
Reading I: Enter the text here. Reading I: (cont. 1) Enter the text here.
Hello Educational presentation.
Test1 Here some text. Text 2 More text.
CMSC201 Computer Science I for Majors Lecture 08 – Lists
Starter What does the following code do?
Data Types and Conversions, Input from the Keyboard
Implementing Functions from a Detailed Design Quick Tips
Insert Presentation Title Here Insert Presentation Summary Here
Your Title Here Your Title Here
While Loops (Iteration 2)
Implementing Functions from a Detailed Design Quick Tips
Teaching London Computing
Use proper case (ie Caps for the beginnings of words)
[Year] [Year] Fold here
HAPPY BIRTHDAY! 21 Fold here
Programming In Lesson 3.
[type text here] [type text here] [type text here] [type text here]
+ + Your text Enter your text Please enter your text Your text
Your text here Your text here Your text here Your text here Your text here Pooky.Pandas.
Please enter text Please enter text DD/MM/YY Please enter text
Your text here Your text here Your text here Your text here
Insert Your Two Line Poster Title Here Your Name Goes Here Department Name Can Go Here Methods Insert your text here. You can change the font size to.
[type text here] [type text here] [type text here] [type text here]
Please send any images as a separate file
Lecture 1 Review of 1301/1321 CSE /26/2018.
Module 3 Selection Structures 4/3/2019 CSE 1321 Module 3.
Module 3 Selection Structures 4/4/2019 CSE 1321 Module 3.
CSE Module 1 A Programming Primer
CSE Module 1 A Programming Primer
Methods and Data Passing
Title Author1 Introduction Results and discussion Conclusion
Insert Your Two Line Poster Title Here Your Name Goes Here Department Name Can Go Here Methods Insert your text here. You can change the font size to.
HAPPY BIRTHDAY! 21 Fold here
Hi, there.
Input and Output Python3 Beginner #3.
Introduction to Python
[Year] [Year] Fold here
Errors.
CSE 231 Lab 2.
Unit 1: Intro Lesson 4: Output.
CONTENTS     Enter text Enter text Enter text Enter text
CSE Module 1 A Programming Primer
CSE 1321 Modules 1-5 Review Spring 2019
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.
File Handling.
Business PowerPoint Template
Lecture 1 Review of 1301/1321 CSE /26/2018.
PLEASE ADD YOUR TITLE HERE.
The main Function, introcs Library, and Prompting
CSE Module 1 A Programming Primer
Module 3 Selection Structures 12/7/2019 CSE 1321 Module 3.
Presentation transcript:

CSE 1321 - Module 1 A Programming Primer 4/11/2019 CSE 1321 Module 1

Ps Skeletons BEGIN MAIN END MAIN Note: every time you BEGIN something, you must END it! Write them as pairs! 4/11/2019 CSE 1321 Module 1

Skeletons def main(): pass if __name__ == '__main__': main() Note: technically, you don’t have to do this. It’s complicated… 4/11/2019 CSE 1321 Module 1

Ps Printing BEGIN MAIN PRINT “Hello, World!” PRINT “Bob” + “ was” + “ here” END MAIN Ps 4/11/2019 CSE 1321 Module 1

Printing def main(): print ("Hello, World!") print ("Bob"+" was"+" here") if __name__ == '__main__': main() 4/11/2019 CSE 1321 Module 1

Declaring/Assigning Variables BEGIN MAIN CREATE userName CREATE studentGPA userName ← “Bob” studentGPA ← 1.2 END MAIN userName “Bob” studentGPA 1.2 Ps 4/11/2019 CSE 1321 Module 1

Declaring/Assigning Variables def main(): userName = 'Bob' studentGPA = 1.2 if __name__ == '__main__': main() 4/11/2019 CSE 1321 Module 1

Reading Text from the User BEGIN MAIN CREATE userInput PRINT “Please enter your name” READ userInput PRINT “Hello, ” + userInput END MAIN Ps 4/11/2019 CSE 1321 Module 1

Reading Text from the User def main(): userInput = input("Please enter your name: ") print ("Hello, ” + userInput) if __name__ == '__main__': main() 4/11/2019 CSE 1321 Module 1

Reading Numbers from the User BEGIN MAIN CREATE userInput PRINT “Please enter your age: ” READ userInput PRINT “You are ” + userInput + “ years old.” END MAIN Ps 4/11/2019 CSE 1321 Module 1

Reading Numbers from the User def main(): age = int(input("Please enter your age: ")) print ("You are ",age," years old.") if __name__ == '__main__': main() 4/11/2019 CSE 1321 Module 1