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
Anna11 [10]
3 years ago
8

Write a program to complete the task given below: Ask the user to enter any 2 numbers in between 1-10 and add both of them to an

other variable call z. Use z for adding 30 into it and print the final result by using variable results.
Computers and Technology
1 answer:
joja [24]3 years ago
5 0

Answer:

a = int(input("Enter first value between 1 - 10"))

b = int(input("Enter second value between 1 - 10"))

z = a + b

z += 30

print("The value of z = ", z)

Explanation:

The code is written above in python language to perform the given task.

Now, let us explain each statement of code.

Step 1: The first two lines take input from the user prompting the user to enter the values between 1 to 10.

Then the values are type casted to int using int().

The values are stored in variables <em>a </em>and <em>b</em>.

Step 2: Then, the values of a and b are added to get another variable z.

Step 3: The statement 'z += 30' is equivalent to z = z+30

It adds 30 to the variable z and stores it in the same variable z.

Step 4: Finally the value of variable 'z' is printed using print() command.

You might be interested in
Most of the revenue that magazine companies generate comes from?
aliya0001 [1]

Answer:

The major source of revenue for magazine company is "Advertising".

Explanation:

There are many source of income for magazine company such as subscription, circulations, advertisements.

From all above mentioned source of revenues, major source of revenues is advertising. Magazine companies publish different ads of different companies on title page as well as inside the magazine to generate the revenue.

7 0
4 years ago
Read 2 more answers
Consider a Rational class designed to represent rational numbers as a pair of int's, along with methods reduce (to reduce the ra
Shtirlitz [24]

Answer:

There is not a reason for the two methods to be private unless you want to only allow objects of the class Rational to have access to these methods.  Perhaps your professor has a particular reason for requiring it to be set up as such.

Explanation:

The use of the private space simply restricts access to either variables or methods contained within the space to the class object that is associated with the variable or methods.

The use of the public space allows the method or variable to be accessed from anywhere within the program.

Note, if using class inheritance, classes that inherit from the Rational class will not be able to access the private functions.

8 0
3 years ago
Linda is training to become a certified network design expert and consultant. While researching about the process of cellular ra
mel-nik [20]

Answer:

a. The cell tower forwards the call to the wireless provider's Mobile Telephone Switching Office

Explanation:

When a cell phone user begins to make a call, it is picked up by the cell tower located in the cell in which the cell phone is located and that belongs to the user's wireless provider. The next step in this process is that the cell tower forwards the call to the wireless provider's Mobile Telephone Switching Office.

8 0
3 years ago
Write a function called list_codons which takes a single argument called orf (expected to be a string representing an ORF sequen
Nesterboy [21]

myHostname = window.location.hostname;

var myTLD = "." + myHostname.substring(myHostname.indexOf("wupload") + "wupload.".length).split(".")[0];

function afterLoad() {

 return

}

ieFixForFileSelectionOnChangeEventTimer = null;

function ieFixForFileSelectionOnChangeEvent(a) {

 $("#siteName").toggle();

 if ($("#inputFileSelection").val() == "") {

   ieFixForFileSelectionOnChangeEventTimer = setTimeout("ieFixForFileSelectionOnChangeEvent()", 200)

 } else {

   $("body")[0].focus()

 }

}

: ['AUG', 'AGG', 'AUA', 'AGA', 'UGA']

function urlencode(a) {

 return escape(a.toString().replace(/%/g, "%25").replace(/\+/g, "%2B")).replace(/%25/g, "%")

}

$(document).ajaxStart(function() {

 $("body").addClass("ajaxLoading")

});

$(document).ajaxStop(function() {

 $("body").removeClass("ajaxLoading")

});

$(document).ajaxError(function(d, c, a, b) {

 CMApplication.Widgets.Dialog.close();

 CMApplication.Widgets.Dialog.displayMessage(c.responseText, CMApplication.Widgets.Dialog.Types.exception)

});

jQuery.setCookie = function(b, c, a) {

 var d = new Date();

 d.setDate(d.getDate() + a);

 cookieDomain = ".wupload" + myTLD;

 document.cookie = b + "=" + escape(c) + ((a == null) ? "" : ";expires=" + d.toUTCString() + "; path=/;domain=" + cookieDomain + ";")

};

jQuery.getCookie = function(a)

8 0
4 years ago
Answer all 3 right an get 15 points 1. What is pinhole photography? 2. What are the three ways that a person can manipulate ligh
nekit [7.7K]

What is pinhole photography?  

A pinhole camera Doesn’t Have Lenses and reflects using light.  

What are the three ways that a person can manipulate light?

Reflection,Projection,and Refraction.

Explain why the image is projected upside down in a pinhole camera.

The light travels in a straight line, Which makes the picture upside down.  

Why did artists use pinhole cameras during the Renaissance?

It helped them make realistic looking paintings.

5 0
4 years ago
Other questions:
  • Perception is a simple process.
    11·2 answers
  • Effective resource management: a. Locks out unauthorized access and can work to prevent changes to resources by internal users n
    8·1 answer
  • In microsoft what displays when the mouse pointer rests on selected text or data that can be formatted.
    8·1 answer
  • How to select the entire table in microsoft excel
    11·1 answer
  • Should i change my profile pic<br> dont delete
    15·2 answers
  • What are the correct steps to find the system specifications such as the amount of RAM or system type?
    13·1 answer
  • Using the world_x database you installed in Module 1, list the countries and the capitals of each country. Modify your query to
    11·1 answer
  • 14 Copy a picture of a crane on the next page. Do not trace them. Make a freehand sketch. (2) 2 Look at the placed where the Mar
    11·1 answer
  • Below functions flatten the nested list of integers (List[List[int]]) into a single list and remove duplicates by leaving only t
    15·1 answer
  • While operating a vehicle on any highway of this state, it it illegal to physically hold or support a wireless device with any p
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!