Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

There is one discussion you will need to participate in this week. To date, we haven't talked too much about handling possible input errors resulting

There is one discussion you will need to participate in this week.

To date, we haven't talked too much about handling possible input errors resulting from a user either accidentally or purposely entering incorrect data that is used by the program. This discussion will allow you to take some of your previous code from week 1 or week 2 and make adjustments such that input errors are handled gracefully.

Using code you developed in week 1 or week 2 and the guidance found in this document:

http://easypythondocs.com/validation.html

use one of the two methods suggested along one or more of the validation techniques provided and fix your code to gracefully and securely handle user input errors.

Just pick a smaller section of the code to fix. Provide the code before and after the fix. Be sure to demonstrate the new fix works as expected by providing screen captures.

Interact with one student and try their code fix. Comment on which method and techniques were used. Make adjustments and experiment to further demonstrate your understanding of their implementation.

Here is the code that I did in week 1(python)

""" Code to add two numbers """ X = 89 Y = 91 Z = X + Y print(Z) 

""" Code to know favorite color """ fav_color = input("please enter your favorite color?") print("The color {} is a fantastic color!".format(fav_color))

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Theory And Application Bio Science And Bio Technology International Conferences DTA And BSBT 2011 Held As Part Of The Future Generation In Computer And Information Science 258

Authors: Tai-hoon Kim ,Hojjat Adeli ,Alfredo Cuzzocrea ,Tughrul Arslan ,Yanchun Zhang ,Jianhua Ma ,Kyo-il Chung ,Siti Mariyam ,Xiaofeng Song

2011th Edition

ISBN: 3642271561, 978-3642271564

More Books

Students also viewed these Databases questions