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
Mumz [18]
3 years ago
13

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
2 answers:
sveta [45]3 years ago
6 0

Answer:

X 5, Y 6, Z 7

Explanation:

Gelneren [198K]3 years ago
3 0
The answer is 45boobg
You might be interested in
Bill needs to make a presentation in which he has to represent data in the form of a pyramid. Which feature or menu option of a
andreyandreev [35.5K]

Answer:If you need to use arrows in a chart, which feature or menu option of a word processing program would you use?

A.  

Picture

B.  

Shapes

C.  

Clip Art

D.  

SmartArt

E.  

Charts

Explanation:

7 0
3 years ago
23. What is the value of 3 - (4 + 2 *3)/(8-2) + 7 * 2+4
Artist 52 [7]

Answer:

30 djjjjj*fjfktdyldydxpitdotdtiotdtod

8 0
3 years ago
Consider an online shopping portal that allows a customer to browse and purchase different products. There are distributed store
andrezito [222]

Answer:

Design a web page that automatically tracks the location to determine the language

Explanation:

8 0
2 years ago
What is the best programming language?
Sophie [7]
There is no "best" programming language. Each programming language has it's one purpose. HTML is used for the skeleton of the web page. CSS is used to style the HTML. Javascript and javascript libraries like jQuery are used to make a web page more interactive. PHP is used to make a web page dynamic. MYSQL used to manage databases. Not all languages are for strictly for web page development. Ruby is an example. But Ruby on Rails is for web development. Some languages are used for making programs. Such as C, C++, C#. There are all sorts of programming languages. Some more popular than others. I have learned multiple programming languages and I have my favorites. If you go to learn multiple languages, I am pretty sure you're gonna have a favorite. 

It basically comes down to what programming language you want to learn.
8 0
3 years ago
3-Write a Python program that has subprograms nested four deep and in which each nested subprogram references local variables, v
vivado [14]

Answer:

Explanation:

Below is a little explanation to guide us through;

There are 4 nested methods : level 0, level 1, level 2, and level 3.

Before the methods, there's a global variable defined that can be accessed by all the methods.

Level 0:

This method uses global variable, creates a level 0 variable in its scope, this level 0 variable can be used by all underlying nested methods.

Level 1: this method uses global, level 0, and level 1 variable, which can be accessed by all underlying nested methods: level 2, level 3.

Level 2: similar to te previous ones, it also uses global, level 0, level 1 variables. And creates a level 2 variable that can be accessed by level 3 also.

Level 3:

This method uses all previously created variables, and creates a new level 3 variable.

Function calls:

As you can see, the function calls are part of the method scopes. So, in order to call level 3, we need to access level 2 (because it is getting called from level 2 scope), for level 2, we must call level 1, for which level 0 needs to be called.

So, level 0 is called, which gives its out put and calls level 1, which gives its own output and calls level 2 and so on till level 3 is also called.

CODE:

global_var = "global" #accessible to all functions

def level0():

level0_var = "level 0" #accessible to level 0,1,2,3

print();

print("Level 0 function:")

print("global variable: ",global_var)

print("local variable 0: ",level0_var)

def level1():

print();

print("Level 1 function:")

level1_var = "level 1" ##accessible to level 1,2,3

print("global variable: ",global_var)

print("local variable 0: ",level0_var)

print("local variable 1: ",level1_var)

def level2():

print();

print("Level 2 function:")

level2_var = "level 2" #accessible to level 2,3

print("global variable: ",global_var)

print("local variable 0: ",level0_var)

print("local variable 1: ",level1_var)

print("local variable 2: ",level2_var)

def level3():

print();

print("Level 3 function:")

level3_var = "level 3" #accessible to level 3

print("global variable: ",global_var)

print("local variable 0: ",level0_var)

print("local variable 1: ",level1_var)

print("local variable 2: ",level2_var)

print("local variable 3: ",level3_var)

level3()

level2()

level1()

level0()

attached is the result of the code, also take note of the indentations too

cheers i hope this helps!!!!!

5 0
3 years ago
Other questions:
  • A survey of results on mobile phone datasets analysis
    5·1 answer
  • How to make flashcards on microsoft word 2010?
    7·1 answer
  • To hide gridline when you display or print a worksheet
    14·1 answer
  • With the ease of the Internet, it is not uncommon for individuals to copy skills from resume templates to make themselves look m
    9·1 answer
  • Deciding whether to explode a process further or determine that it is a functional primitive is a matter of experience, judgment
    8·1 answer
  • Write a program in which given an integer num, return the sum of the multiples of num between 1 and 100. For example, if num is
    7·1 answer
  • Suppose you present a project and your supervisor comments that the graphics need to be a higher quality and suggests you replac
    9·2 answers
  • . The electric company charges according to the following rate schedule: 9 cents per kilowatt-hour (kwh) for the first 300 kwh 8
    12·1 answer
  • What will the following code display? int numbers[4] = { 99, 87 }; cout << numbers[3] << endl; a. 87 b.0 d. 34. What
    12·1 answer
  • What do you consider to be the next big thing in "Small Systems" (technology, hardware, software, etc.) and why?
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!