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
juin [17]
3 years ago
15

Write a program that takes a single integer input from the user and stores it in a variable. Your program should increase the va

lue of this variable by one three times, printing "number is now " followed by its value each time, then decrease it by one three times, again printing "number is now " and the value each time
Computers and Technology
1 answer:
Allushta [10]3 years ago
8 0

Answer:

Question is answered using python:

num = int(input("User Input: "))

for i in range(3):

    num = num+1

    print("Number is now "+str(num))

for i in range(3):

    num = num-1

    print("Number is now "+str(num))

Explanation:

This line prompts user for input

num = int(input("User Input: "))

The following iterates from 1 to 3

for i in range(3):

This increments user input each time

    num = num+1

This prints the value of num after increment

    print("Number is now "+str(num))

The following iterates from 1 to 3

for i in range(3):

This decrements the value of num

    num = num-1

This prints the value of num after decrement

    print("Number is now "+str(num))

You might be interested in
When do I use while loops
Marat540 [252]

Answer:

When you dont know how long the loop is going to run for

Explanation:

7 0
3 years ago
What are an administrator's choices for managing file permissions on a drive formatted as fat32?
Alexeev081 [22]
<span>If the drive is a network share, then Share permissions can be used.</span>
6 0
4 years ago
Drag the tiles to the correct boxes to complete the pairs.
arlik [135]

Smart devices is a technology trend, interest in renewable energy is a social trend, and buying solar panels and generators is a consumer trend.

4 0
3 years ago
Read 2 more answers
Advantages and disadvantage of Online Tutoring (such as for school-goers)
Tanya [424]

Answer:

Ten Advantages of Online Courses  

What are the advantages of an online course?

1. Online courses are convenient.

2. Online courses offer flexibility.  

3. Online courses bring education right to your home.

4. Online courses offer more individual attention.

5. Online courses help you meet interesting people.

6. Online courses give you real world skills.

7. Online courses promote life-long learning.

8. Online courses have financial benefits.

9. Online courses teach you to be self-disciplined.

10. Online courses connect you to the global village.

Ten Disadvantages of Online Courses

How could there possibly be any disadvantages of online courses? Read on.

1. Online courses require more time than on-campus classes.

2. Online courses make it easier to procrastinate.

3. Online courses require good time-management skills.

4. Online courses may create a sense of isolation.  

5. Online courses allow you to be more independent.

6. Online courses require you to be an active learner.

7. Online courses don't have an instructor hounding you to stay on task.

8. Online courses give you more freedom, perhaps, more than you can handle!

9. Online courses require that you find your own path to learning.

10. Online courses require you to be responsible for your own learning.

6 0
3 years ago
Suppose a JPanel with a BorderLayout manager contains two components: component1, which was added to the EAST, and component2, w
Tamiku [17]

Answer:

b) I, II, III

Explanation:

Since the two components are added to the 'east' and 'west', and the JPanel has a BorderLayout manager, then North, South and Center parts of the JPanel will appear.

3 0
3 years ago
Other questions:
  • Which of the following correctly describes the reason for quality customer service?
    15·2 answers
  • Documents stored on the world wide web are written and linked together using
    14·1 answer
  • What does C.L.O stands for?
    13·2 answers
  • Advanced Electronics has employees who use a company website to share work. By posting on the website, employees are
    7·1 answer
  • For what reason can security risks never be fully eliminated?​
    7·1 answer
  • Animation timing is does not affect the
    10·1 answer
  • A group of statisticians at a local college has asked you to create a set of functions that compute the median and mode of a set
    12·1 answer
  • Which is the most correct option regarding subnet masks?
    10·1 answer
  • NFPA 780, Standard for the Installation of Lightning Protection Systems provides information on the installation of _____ for li
    6·1 answer
  • Once multiple layers are selected which keyboard shortcut merges them
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!