1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
sladkih [1.3K]
4 years ago
7

Three variables, x, y and z, supposedly hold strings of digits, suitable for converting to integers. Write code that converts th

ese to integers and print the sum of these three integers. However, if any variable has a value that cannot be converted to an integer, print out, the string "bad value(s) in: " followed by the names of the variables that have bad values (separated by spaces, in alphabetically ascending order). For example, if the values of x, y and z were respectively "3", "9", "2" then the number 14 would be printed; but if the values were "abc", "15", "boo" then the output would be: bad value(s) in: x z
Computers and Technology
1 answer:
sineoko [7]4 years ago
5 0

Answer:

Required code is given below:

Explanation:

x, y, z = "abc", "15", "boo"

errors = []

try:

   x = int(x)

except ValueError:

   errors.append('x')

try:

   y = int(y)

except ValueError:

   errors.append('y')

try:

   z = int(z)

except ValueError:

   errors.append('z')

if len(errors) == 0:

   print(x+y+z)

else:

   print('bad value(s) in: ' + ' '.join(errors))

You might be interested in
Large and powerful computer capable of processing and storing large amounts of business data
Nata [24]

Answer:

True

Explanation:

but no need to be large physically ;)

the important point is the computer must have a proper specification to process a large amount of data

6 0
3 years ago
Select the correct answer from the drop-down menu. Which two technologies support the building of single-page applications? and
Nataliya [291]

Answer:

JavaScript frameworks and Ajax

Explanation:

6 0
4 years ago
A company is inviting design for its new corporate logo from its users. This is an example of ? A. Crowdfunding B. Crowdvoting C
adoni [48]

a crown Source because is beautiful in its own way and it'll be a nice company because you can own the company in a beautiful way now will people wakes blow and now there is not a company that's named the same thing and over and over again

6 0
3 years ago
Read 2 more answers
How to disappear completely from the internet pc magazine
GREYUIT [131]

In order to disappear completely from the internet, one needs to delete their social media accounts, delete their emails, etc.

The internet is a network of interconnected computer systems. Despite its numerous advantages, it also has several disadvantages and there are some moments when we want to disappear from the internet.

The steps that are needed to disappear from the internet include:

  • Delete your social network accounts.
  • Delete your email accounts.
  • Use search engines to track your old activities online and delete them.
  • Falsify the accounts that can't be deleted.
  • Unsubscribe from mailing lists.

Read related link on:

brainly.com/question/24902823

4 0
3 years ago
Should there be an agency in charge of the Internet? How would business, government, and education be impacted if the Internet w
aksik [14]
I believe the government should not be able to regulate or control the internet. The internet is a place to express and exchange new ideas. And when an agency or government starts to regulate the internet, they can prevent from view certain content.

There is something called net neutrality. Its definition can be found on Google, "the principle that Internet service providers should enable access to all content and applications regardless of the source, and without favoring or blocking particular products or websites." - Google

What that means is, that internet service providers (ISP's) should provide all content without discrimination. For example. There is two ISP's. ISP A and ISP B. ISP B does not practice net neutrality. So, when a customer has ISP B's service, he/she cannot view content from ISP A. Or whatever company or websites ISP B does not want you to view. On the contrary, ISP A practice net neutrality. ISP A provides all content for its customers. Even if ISP A doesn't like ISP B or any websites, it still allows their customers to view that content. 

I support for new neutrality. And so should you.
3 0
4 years ago
Other questions:
  • Write a program that defines a type for a structure that stores information on a student in ENG EK 125. Declare two variables to
    8·1 answer
  • To support an internet client, you must have six elements. the first three -- a computer, an operating system and tcp/ip -- are
    7·1 answer
  • C programming: loading a dictionary into a trie data structure. Why am I segfaulting?
    8·1 answer
  • LAB: Formatted output: Hello World! Write a program that outputs "Hello World!" For ALL labs, end with newline (unless otherwise
    10·1 answer
  • Which terms represent the two types of client requirements?
    14·1 answer
  • 8. _______ are used to store all the data in a database.
    7·2 answers
  • Write a python program to print the square of all numbers from 0 to 10.
    15·1 answer
  • Draw a flowchart diagram for a program that display a person's name x times​
    5·1 answer
  • 2.3 pseudocode exercise on edhesive
    9·1 answer
  • A social service agency hires accenture to improve training and experiences for caseworkers. What is one way accenture can use v
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!