Write a program that takes a single integer input from the user and stores it in a variable. Your program should increase the value 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

Answers

Answer 1

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))


Related Questions

Define data, information and the relation between the two?

Answers

Answer:

Program data is a type of information that a computer processes or retains. This data can be in the context of text records, photographs, etc.

Explanation:

In a particular context, information is a collected from different source, structured data provided which is beneficial to society. Data is a core objectives containing raw material which carries no special significance. Info is a collection of facts that bears a logical sense collectively.

What symbol must be used at the end of an if statement?
:
.
#

Answers

Answer:

period thats the answer .

Explanation:

2nd one

the answer is d i think

The speed of mainfarme computer is measured in...... fill in the blanks​

Answers

Mainframe computers are huge towering machines with lots of processing power and are measured in MIPS (Million Instructions Per Second). Windows Explorer is the operating system's file and folder manager. A minicomputer can support about 200 users at the same time. They are referred to as small or mid-size servers.

Explanation:

Mainframe computers are huge towering machines with lots of processing power and are measured in MIPS (Million Instructions Per Second).3 days

to generate a series of first ten counting number of algorithm​

Answers

uhh i need points so i don’t fail math.

What's not an computer characteristic ??

Answers

Answer:

A computer is an electrical machine

The computer cannot think at its own

The computer processes information error-free

The computer can hold data for any length of time

Explanation:

The computer is an electrical machine is not a computer characteristic option (A) a computer characteristic is correct.

What is a computer?

A computer is a digital electronic appliance that may be programmed to automatically perform a series of logical or mathematical operations. Programs are generic sequences of operations that can be carried out by modern computers. These apps give computers the capacity to carry out a broad range of tasks.

The question is incomplete.

The complete question is:

What's not a computer characteristic?

A computer is an electrical machineThe computer cannot think on its ownThe computer processes information error-freeThe computer can hold data for any length of time

As we know,

The characteristics of a computer are:

The computer is unable to think for itself.

Information is processed by the computer without error.

The computer has unlimited storage capacity for data.

Thus, the computer is an electrical machine is not a computer characteristic option (A) a computer characteristic is correct.

Learn more about computers here:

https://brainly.com/question/21080395

#SPJ2

Nadia has inserted an image into a Word document and now would like to resize the image to fit the document better.

What is the quickest way to do this?

keyboard shortcut
sizing handles
context menu
sizing dialog box

Answers

Sizing handles but I’m not super sure

Brainly, ""helping you get better grades"
ahem im sorry but uh ur lying because i made a C on my exam and im really mad smh

Answers

Answer: What do you except? All of this is user generated..

Explanation:

Yikes- well I mean these are real people answering so they could make mistakes too

What is a slide master ?​

Answers

Explanation:

Slide Master is a tool used in Microsoft PowerPoint to create slide templates. Slide Master can save slide layouts, including the background, color, fonts, effects, positioning, etc.

hope it helps!

Answer:

A slide master is the top slide in a hierarchy of slides that stores information about the theme and slide layouts of a presentation, including the background, color, fonts, effects, placeholder sizes, and positioning. Click to select the master slide, then click Master Layout on the Slide Master tab.

Desktop computers are often provided in the workplace by organizations, and laptops may be as well. However, portable devices (such as tablets and smartphones) may more commonly be allowed on a BYOD basis. For a BYOD (personally-owned) device:

Answers

Answer:

Organizations may have requirements about how BYOD devices may be configured to access the information resources of the organization.

Explanation:

Desktop computers and laptops are often provided for the employees in the workplace. On a BYOD basis, portable devices such as tablets and smartphones may more commonly be used.

For a BYOD (personally-owned) device, organizations may have requirements about how BYOD devices may be configured to access the information resources of the organization.

In what type of attack does the attacker have the ciphertext of several messages that were encrypted with the same encryption algorithm, but has no access to the plaintext so he or she must try to calculate the key used to encrypt the data

Answers

in ciphertext-only.

EXPLANATION: it is an attack model for cryptanalysis where the attacker is assumed to have access only to a set of ciphertexts. The attack is completely successful if the corresponding plaintexts can be extracted or, even better, the key.

A tree topology is a combination of
topology and
topology.

Answers

Answer:

Tree topology is a combination of star and bus topology. This topology is mostly used on larger networks. It is the best topology cuz the signals that are transmitted by the root nodes are received by all the computers at the same time.

According to Albert Einstein, our very existence is inextricably linked to bees - he is reputed to have said: "If the bee disappears off the surface of the globe, then man would only have four years of life left."
a.
Humans only have 4 years left to live.
c.
Human existence is dependent on bees.
b.
Bees are dependent on human existence
d.
None of the above

Answers

i’m pretty sure it’s c because they r the most important pollinator of crops
C (useless words here)

You are installing an updated driver for a hardware device on your system. A dialog box displays indicating that Microsoft has digitally signed the driver you are installing. What benefits does driver signing provide

Answers

Answer:

1)The driver has been tested by Microsoft

2)The driver file has not been altered

Explanation:

From the question, we are given an instance whereby I'm installing an updated driver for a hardware device on your system. A dialog box displays indicating that Microsoft has digitally signed the driver you are installing.

The benefits that this driver signing provide are;1)The driver has been tested by Microsoft

2)The driver file has not been altered

driver reffered to group of files that give room for communication between one or more hardware devices and the operating system of the computer, it is through a driver that a computer will be able to receive/send data to hardware device correctly. The device could be a printer. to digitally sign drivers by Microsoft, the drivers must be certified by Microsoft and a signature will be provided for the driver by Microsoft.

Reason Microsoft do digitally signed drivers is that during Windows device installations , digital signature is used in verification of integrity of the driver package and also the identity of the vendor can be known, window might not run a driver that is not certified by Microsoft on 64/32 bit system.

Question 4Write a C++ program which display the following shape.
*****

Answers

Answer:

The code to this question can be defined as follows:

#include <iostream>//header file

using namespace std;//namespace

int main()//main method

{

int x,y;//defining variable

for(x = 1; x <= 7; x++)//defining outter for loop for print rows

{

for(y = 1; y <= 7; y++)//defining inner for loop for print column

{

if(y <= x)//defining if block to check y less then equal to x

cout << "*";//print asterisk value

else//defining else block

cout << " ";//use for spacing

}

for(y = 7; y >= 1; y--)//defining for loop for print right triangle

{

if(y <= x)//defining if block to check y less then equal to x

cout << "*";//print asterisk value

else//defining else block

cout << " ";//use for spacing  

}

cout << "\n";//use for line break

}

return 0;

}

Output:

please find the attachment.

Explanation:

In the above program code, two integer variable "x, y" is declared, which is used in the for a loop. In this, two for loop is used to print the left triangle, and the last loop is used to print the right triangle. In both, the loop uses if block to check y is less than equal to x and print the asterisk value with the spacing.

PLEASE SOMEONE PLEASE HELP ME OUT!!!!

Answers

Answer:   Ideate

Explanation:

Answer:

the 1st one

Explanation:

please help please I will count your answer brainiest if you help!
In what ways are math and computer science similar? How are they different?

Answers

Answer:

Without mathematics, computer science would not exist. Computers use algorithms to obtain certain information, and output certain information. Linear equations and algebra are used to create gaming graphics.

Have you ever wondered how your online quizzes were made? Inside the online quizzes there is code behind it, this code uses variables, integers, and booleans.

Variables use equations like x and y to find sum. A boolean is a basic algebraic notation, it's a binary variable.

Everything uses math, nothing would exist without math, including even digging dirt.

What are the characteristics of the Outlook Rules Wizard? Check all that apply.
It is useful for staying organized.
Message dates can be changed.
Users can edit the rule description.
Users can move messages to folders.
It is divided into three template choices.
Messages can be divided into categories.

Answers

Answer:

acde

Explanation:

Answer:

It is useful for staying organized.

Users can edit the rule description.

Users can move messages to folders.

It is divided into three template choices.

How do you send friend requests?

Answers

Answer:

i dont know how too i dont think you can

What is Ce stands for?
O Carbon character
O Carbon calender
Carbon copy
O character change​

Answers

Explanation:

hello I don't know ok sorry

What does the National Institute of Standards and Technology do? Promotes innovation by advancing measurement standards promotes cooperation in metrology among several regions provides certifications to individuals working in the field of metrology provides mentors to individuals working in the field of metrology

Answers

Answer:

Promotes innovation by advancing measurement standards

Explanation:

The National Institute of Standards and Technology was Founded in the year 1901, this agency is a non-regulatory body that is found within the United States Department of Commerce.

The mission of this agency is the promotion of innovation and also industrial competitiveness through the advancing of measurement science, standards, and also technology in several ways that raises economic security and also brings about improvement in the quality of life.

Answer:

(D) promotes innovation by advancing measurement standards

Explanation:

Which step in the software development life cycle involves making improvements based on user feedback?
Coding
Design
Maintenance
Testing

Answers

Answer:

The step is Testing oki doki

Answer:

Maintenance

Explanation:

Maintenance

This primarily involves updating and making improvements based on user feedback, as well as resolving any defects that are found.

Can someone please give me Python test 3 it would help me tremendously

Answers

Question 1:  To tell what will happen when an if-statement is false.

Question 2: The = should be ==

                    elseif should be elif

                    The else should have a :

Question 3: All algorithms can only do number calculations.  

Question 4: and

Question 5: To make a follow-up True/ False decision

Question 6: if (text1 > 15):

Question 7: if (text1 == 78):

Question 8: if (num1 != num2):

Question 9: >=

Question 10: 4

Question 11: 3

Question 18: a < b and a != b  

Question 19: !=

Sorry about 12 - 17 and 20 i can't seem to find those questions guessing you wanted edhesive. I dont have an account on it.

about IPO cycle with a digram

Answers

Answer:

The IPO Cycle is termed as Input-Processing-Output cycle. A computer receives data as input, processes it, stores it and then produces output. ways. This manipulation is called processing.

Brendan needs to edit all the slides in a presentation by adding a company logo and a header and footer. Which is
the easiest method for doing this?
Edit the Slide Master.
Edit the Notes Master.
Use the Format Painter option.
Creating an additional slide layout.

ITS C

Answers

Answer:

should be slide master

Explanation:

computers

What three actions happen when you cloak a folder or file?

Answers

Answer:

A three actions happen when you cloak a folder or file is explained below in details.

Explanation:

You can cloak data and folders on the forgotten or local site. Cloaking eliminates cloaked data and folders from the subsequent actions:

Presenting Get, Check-In, and Check-Out executions

Producing reports

Getting newer local and newer forgotten files

Accomplishing sitewide executions, such as monitoring and modifying links

Synchronizing

Working with Asset panel contents

Refreshing templates and libraries

Select the correct answer.
David is creating an app that is optimized for a 4.7-inch screen. Which size category will he use when developing the app?
A.
xlarge
B.
large
C.
normal
D.
small

Answers

Answer:

large

Explanation:

What's a checked exception?

A
One that the Java class library already checks for, so our programs don't have to worry about checked exceptions.

B
One that the program must check because the compiler can't check it.

C
One that the compiler can check to make sure the program handles it.

D
One that the operating system checks, evaluates, and corrects.

Answers

Answer:

The answer is option A "One that the Java class library already checks for, so our programs don't have to worry about checked exceptions"

Explanation:

A checked exception is a sort of special case that should be either gotten or proclaimed in the method in which it is declared.

In the Java class chain of importance, a special case is a checked exception in the event that it acquires from java.lang.Throwable, however not from java.lang.RuntimeException or java.lang.Error. All the application or business rationale exceptions should be checked special cases.

It is conceivable that a strategy proclaims that it can toss a special case, however it doesn't. In any case, the guest needs to manage it. The checked exception announcement has a domino impact. Any strategies that will utilize the past strategy will likewise need to deal with the checked exception, etc.

So the compiler for the Java programming language checks, at gather time, that a program contains overseers for all application exceptions, by examining every method body. In the event that, by executing the method body, an exception can be tossed to the guest, that special case should be announced. How does the compiler know whether a method body can toss an exception? That is simple. Inside the method body, there are calls to different strategies; the compiler takes a gander at every one of their strategy signature, what exceptions they proclaimed to declare.

Answer:

The correct answer is C)

Explanation:

Within Java, a checked exception is one that is checked by the compiler.

When a code within a method generates a checked exception, one of two things must happen:

a) the method should take care of the exception or

b) it should indicate the exception using throws keyword.

Cheers

If the transmitting device would like for the receiving device to push currently buffered data to the application on the receiving end immediately, it would set the ____ flag.

Answers

Answer:

The right approach will be "PSH".

Explanation:

The PSH flag seems to be an acceptable solution through TCP which always encourages the submit implementation to immediately transfer data but only whenever the buffer isn't complete. The implementation helps to formulate this same flag towards true for something like the connection, as well as TCP will instantly begin transmitting the relevant information.

To increase security on your company's internal network, the administrator has disabled as many ports as possible. Now, however, you can browse the internet, but you are unable to perform secure credit card transactions when making purchases from e-commerce websites. Which port needs to be enabled to allow secure transactions

Answers

Answer: 443

Explanation:

Port 443 will need to be enabled for secure transactions to go through because it is the default port for HTTPS which is the transfer protocol for secure communication.

This way your credit card transactions will be encrypted to ensure protection from those who would seek to steal your data and your money.  

Please help! Due by tonight! Greatly appreciated!

Answers

Answer:

Im sorry if im wrong but i took a class for coding a long time ago but i think  it is 6 :)

Other Questions
Please solve and explain the two problems. Question 2 of 10Fill in the blank in the following sentence with the appropriate verb in theconditional tenseTuestudiar esta nocheA. debisteB. debasC. debesD. deberas PLZZZ Help with this!Star A is about 3.4 X 10^18 miles from Earth. Star B is 6.8 X 10^16 miles from Earth. Star A is how many times as far from Earth as Star B? which function listed below represents a greater rate of change, and what is the slope of the function?A. Function 2 has a greater rate of change; the slope is 4.B. Function 2 has a greater rate of change; the slope is 3.C. Function 1 has a greater rate of change; the slope is 1.D. Both functions have equal rates of change; both slopes are 3. Multiply7z3 (2z2 4z).A. 14z5 28z4B. 9z5 11z4C. 14z6 28z4D. 14z Jay has a budget of $100. Jay spent $13 on movie tickets, $38 on dinner with his friend, and $11 on a taxi ride home. How much money does Jay have left in his budget? -3a+4=-14All work shown please Need Help me ASAP!!!! X-rays had a frequency of about 3x10^18 determine it's wavelength (in nm) and energy per photon 5Select the correct answer.Celine's computer motherboard malfunctioned and had to be replaced. On starting her computer again, she finds that the logo and otherstartup text have changed completely, although there is no change to her desktop and personal files. Which storage device is likely to have beenchanged?. .DVD driveOB.ROMhard diskODsound cardOE.RAMResetNextLook That realm of activity that lies between the state and the market, including the family, schools, community associations, and non-economic institutions, is known by social scientists as A stone is thrown vertically upwards with an initial velocity 20m/s. Find the maximum height it reaches and the time taken by it to reach the height.(g= 10m/s)who gives answer with explanation i will make him braillint of the 80 students who signed up for after school clubs , 16 students signed up for the art club and the the other one signed up for different clubs find the ratio of the number of students who signed up for art club and student who sighned up for other clubs express your answer in simplest form A factory worker can package 180 games in 15 minutes. How many games can he package per minute? Find the equation of the line (help please) Is "watching a movie about dinosaurs" a primary or a secondary source? Given the points (-1,1) and (-2,1) on the line find the equation of the line what is authoritative If 3 tan A =cot A and A is an acute angle find angle APlease, I need detailed explaination If skim milk is 87% water, how many cups of skim milk contain 3.58 cups of water?