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
Which diagram is NOT a good model of 3÷14?
swat32
I need a pic for this
7 0
2 years ago
Read 2 more answers
Which operating system is used by most the supercomputer system in the world
DENIUS [597]

Answer:

Linux

Explanation:

Linux runs all of the top 500 supercomputers

3 0
2 years ago
Of the 5 factors that should be evaluated when assessing information's quality (Validity, Reliability, Accuracy, Timeliness, and
Art [367]
Validity is the best asseng information to evaluate the all factors
8 0
2 years ago
Create a single line comment that says ""Print results to screen""
levacccp [35]

Answer:

//""Print results to screen""

Explanation:

In c,c++,java,javascript // is used for the single line comment.

syntax:- // comment.

Whatever text that is followed after // is commented means this line will not get executed by the compiler.

Comments are used to explain the code to other person who is working on the code or trying to understand that code.

6 0
3 years ago
What is a close syllable
Tasya [4]
A closed syllable<span> is a </span>syllable<span> that ends with a consonant. The words fan, am, and left have </span>closed syllables<span>. Multi-syllabic words have </span>closed syllables<span> too. For example, a two-</span>syllable<span> word with the vowel-consonant-consonant-vowel pattern may have one or two </span>closed syllables<span>.</span>
5 0
2 years ago
Read 2 more answers
Other questions:
  • when reading a recipe ingredients witch substance make the rice an unhealthy choice if it is present in a high amount
    13·1 answer
  • Write a program that calculates the cost of a phone call. The user enters a positive integer that
    11·1 answer
  • What happens if i receive a text while my phone is off?
    15·1 answer
  • I’m which scenario would someone most likely be using presentation software ?
    6·2 answers
  • Technician A says that PTC heaters can be built into a conventional heater core assembly. Technician B says that a PTC heater's
    11·1 answer
  • IDE devices require the use of a controller mounted on the motherboard. True False
    14·2 answers
  • In the game of $Mindmaster$, secret codes are created by placing pegs of any of seven different colors into four slots. Colors m
    5·1 answer
  • An IT security threat is anything that might cause serious harm to a computer system, including someone stealing a laptop that c
    8·2 answers
  • In a PC, which of the following components stores the BIOS
    6·1 answer
  • WAP to find area of circle​
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!