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
When should you talk to an adult you trust
Gnesinka [82]

Answer:

you should talk to them when u think its the right time and you think u can trust them

5 0
3 years ago
A customer survey asked respondents to indicate their highest levels of education. The only three choices in the survey were hig
solong [7]

Answer:

27%

Explanation:

100% = 26% + 47% + x%

100% = 73% + x%

27% = x%

4 0
3 years ago
What will the document.write() statement display, given the following code snippet? var scores = new Array[94, 90, 88, 82, 73, 7
astra-53 [7]

Answer:

There are 7 scores recorded. The dropped score is 75

Explanation:

The code snippet above prints through the document.write() function. the output prints the string serving as the argument, and makes use of variables (lgth) and expression also (scores [lgth -1]). what it does is. From the point where it sees +lgth+, it checks the value, which is 7. And when it sees scores [lgth-1] it evaluates it to 75. Hence, the string above is produced.

4 0
3 years ago
ASAP HELP
vovangra [49]

Answer:@the bottom slide

Explanation:wats ya email i

will help u

8 0
3 years ago
What function would you use to calculate the total interest paid for the first year of a mortgage?.
WITCHER [35]

Answer:

To calculate the total interest paid for the first year of a mortgage, the formula M = [P.r (1+r)n] / [(1+r)n-1] × 12 can be used.

Explanation:

3 0
2 years ago
Other questions:
  • Fax machines, voice mail, electronic mail, and electronic conferencing are all examples of _________.
    15·2 answers
  • Which of the following can be considered beta testing? A programmer at Linus Systems checks the integration of multiple modules
    14·1 answer
  • Which of the following software maintenance steps erases gaps caused by deleting files from the hard drive?
    10·1 answer
  • Which option is an example of a Boolean operator?<br> O A. HTML<br> O B. <br> C. SEO<br> D. NOT
    5·1 answer
  • Explain what middleware is. Name a common middleware in two-tier client/server architecture for database applications.
    10·1 answer
  • What is the full form of 'Rom<br>​
    7·2 answers
  • PLEASE HELP I mainly only need the answer for 4.
    5·1 answer
  • How can you say that a painting is real? ​
    7·2 answers
  • Imagine that you just received a summer job working for a computer repair shop one of your first task is to take apart a compute
    14·1 answer
  • Which of the following online creation tools will be used if a person wants to create a video presentation?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!