Validation final steps Stopping gaps being entered in an input.

Slides:



Advertisements
Similar presentations
Keyboarding Vocabulary I Finals Study Basic Computer.
Advertisements

Keyboard Training Instruction by: Connie Hutchison & Christopher McCoy.
CATHERINE AND ANNIE Python: Part 3. Intro to Loops Do you remember in Alice when you could use a loop to make a character perform an action multiple times?
Computer Programming w/ Eng. Applications
1. Write an Excel text function in cell Company Data!A4, which may be copied down, to string together the first and last name with only the first letter.
Computer Science & Engineering 2111 Text Functions 1CSE 2111 Lecture-Text Functions.
COMPUTER PROGRAMMING I Essential Standard 5.02 Understand Breakpoint, Watch Window, and Try And Catch to Find Errors.
Fortran 1- Basics Chapters 1-2 in your Fortran book.
07/10/ Strings ASCII& Processing Strings with the Functions - Locate (Instr), Mid, Length (Len), Char (ChrW) & ASCII (Asc)
Mastering Char to ASCII AND DOING MORE RELATED STRING MANIPULATION Why VB.Net ?  The Language resembles Pseudocode - good for teaching and learning fundamentals.
Strings CSE 1310 – Introduction to Computers and Programming Vassilis Athitsos University of Texas at Arlington 1.
Manipulating Text In today’s lesson we will look at: why we might want to pick out parts of text strings some BASIC functions that can be used to chop.
1 Κατανεμημένες Διαδικτυακές Εφαρμογές Πολυμέσων Γιάννης Πετράκης.
Problem : At Kiddy School, the teachers used the A, B,C for grading the students’ works. If the student get an A, then the teacher will print “Excellent”
A Simple Quiz: Ask User Functions. By Lana Dyck under the direction of Professor Susan Rodger Duke University June 2009, added Part 2 July 2011.
Continue with conditional
Validation "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the Universe trying to.
Perl Day 4. Fuzzy Matches We know about eq and ne, but they only match things exactly We know about eq and ne, but they only match things exactly –Sometimes.
Repetition. Loops Allows the same set of instructions to be used over and over again Starts with the keyword loop and ends with end loop. This will create.
Dr. Tami Meredith Saint Mary's & Dalhousie Universities.
Asking the USER for values to use in a software 1 Input.
Copyright © 2010 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with Programming Logic & Design Second Edition by Tony Gaddis.
Data Validation while loops. Data validation Programs get input data from different sources All data should be ‘validated’ before the program tries to.
Validation using Regular Expressions. Regular Expression Instead of asking if user input has some particular value, sometimes you want to know if it follows.
Copy of the from the secure website - click on the AccoridaLife.zip link.
More Sequences. Review: String Sequences  Strings are sequences of characters so we can: Use an index to refer to an individual character: Use slices.
Introduction to Computer Programming - Project 2 Intro to Digital Technology.
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.
Strings CSE 1310 – Introduction to Computers and Programming Vassilis Athitsos University of Texas at Arlington 1.
Special Methods in Java. Mathematical methods The Math library is extensive, has many methods that you can call to aid you in your programming. Math.pow(double.
1 Project 7: Looping. Project 7 For this project you will produce two Java programs. The requirements for each program will be described separately on.
Last of String Manipulation. Programming Challenge: Usernames Let’s say you work at the IT department for NYU and you are asked to generate student ID’s.
IMS 3253: Validation and Errors 1 Dr. Lawrence West, MIS Dept., University of Central Florida Topics Validation and Error Handling Validation.
1 VB-06-String Manipulation Mar 03, 2002 String Function VISUAL BASIC.
CSC 162 Visual Basic I Programming. String Functions LTrim( string ) –Removes leading spaces from the left side of string RTrim( string ) –Removes trailing.
Visual Basic Declaring Variables Dim x as Integer = 0 In the statement above, x is being declared as an Integer (whole number) and is initialised.
Intelligent Data Systems Lab. Department of Computer Science & Engineering Practices 컴퓨터의 개념 및 실습 4 월 11 일.
DEVRY COMP 122 L AB 7 L AB R EPORT AND S OURCE C ODE C HECK THIS A+ TUTORIAL GUIDELINE AT HTTP :// WWW. ASSIGNMENTCLOUD. COM / COMP -122/ COMP LAB.
EET 2259 Unit 13 Strings and File I/O
CS 240 – Computer Programming I Lab
Validation Bury College.
Engineering Innovation Center
Representing Characters
Loops The loop blocks you've used in Scratch can all be recreated in C! Loops allow for the repetition of code until a condition is met. There are three.
W Customize this banner with your own message! Select the letter and add your own text. Use one character per slide.
Conditions and Ifs BIS1523 – Lecture 8.
Use proper case (ie Caps for the beginnings of words)
More Loops.
More Loops.
An Introduction to Python
Manipulating Text In today’s lesson we will look at:
B Customize this banner with your own message! Select the letter and add your own text. Use one character per slide.
Encryption and Decryption
We’re moving on to more recap from other programming languages
4.1 Strings ASCII & Processing Strings with the Functions
H Customize this banner with your own message! Select the letter and add your own text. Use one character per slide.
B Customize this banner with your own message! Select the letter and add your own text. Use one character per slide.
Class Examples.
Python programming exercise
Chapter 7: Input Validation
String Processing 1 MIS 3406 Department of MIS Fox School of Business
Introduction to Computer Science
Reading from and Writing to Files
Year 9 Entry Level Computing
EET 2259 Unit 13 Strings and File I/O
Python Strings.
W Customize this banner with your own message! Select the letter and add your own text. Use one character per slide.
Reading from and Writing to Files
String Handling.
H Customize this banner with your own message! Select the letter and add your own text. Use one character per slide.
Presentation transcript:

Validation final steps Stopping gaps being entered in an input

Basic validation using len function What this code will do is prevent an end user entering in code that is less than 0

Stopping gaps being entered This code replaces a double space with a normal space using.replace Strips specific characters from a string using a replace function (this example uses a space)

Code to validate if entered text or a number Looks at the type of data which has been entered using other methods..isalpha() - contains alphabetic character.isdigit() - contains digits 0-9.isnumeric() - contains numbers

Validating-no capitals allowed The following code will not let an end user input capital letters as it will keep looping back asking them to input forever loop which exits when an or condition is met. A.lower() method is also used to force input to become lower case

Validating making sure end user enters a name of more than 5 characters A len() function used with a forever loop It exits when the string length is >0 Two different messages can be used What this code will do is that it will loop -you must enter a name if you don’t enter a name and the only way you can stop it is by pressing control c to kill the program This code above puts a validation control in that says if the user enters a name less than 5 characters the program will loop message you must enter more than 5 characters