Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

programming language in python Solicit three good values (could be integer, float or string) and operate on them when any of the cases becomes true:

programming language in python image text in transcribed
Solicit three good values (could be integer, float or string) and operate on them when any of the cases becomes true: (Case 1) all integer/float --> action: add them up; (Case 2) all string --> action: concatenate them. Other than the above cases we consider it bad input and must resolicit input again. This time we are requesting one-line keyboard input (you cannot break into three soliciting lines). Input values are separated by space (not comma). The space is also called delimiter (separator) in CSC terminology. If you need a quick reference watch this video (turn computer volume off). For more info, see right hand side Note Box (casting) Good Input: 20-4.50 --> Result in 15.5 Good Input: Hello World !--> Result in HelloWorld! Bad Input: O HI-223 Bad Input:%bbty78 35.0 -129 8 a = "%bbty78" 9 print("Working? ", str(a) 10 11 print("Working? ", eval(a)) 13 print("Working? ", int(a))

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_2

Step: 3

blur-text-image_3

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

Microsoft Visual Basic 2017 For Windows Web And Database Applications

Authors: Corinne Hoisington

1st Edition

1337102113, 978-1337102117

More Books

Students also viewed these Databases questions