Write a program that asks the user for a positive nonzero integer value. The program should use a loop to get the sum of all the integers from 1 up to the number entered. For, example if the user enters 50 , the loop will find the sum of 1,2,3,4,...,50. while loop

Answers

Answer 1

num = 0

while num <= 0:

   num = int(input("Enter a number: "))

i = 1

total = 0

while i <= num:

   total += i

   i += 1

print(total)

I wrote my code in python 3.8. Best of luck.


Related Questions

Kali, a Python programmer, is using the turtle module to write the word "hello." Which code should she use to indicate the location to begin writing the word? # Pick up the turtle and move it to its starting location. penup(-100, 200) goto() pendown() penup() goto(-100, 200) pendown() # Pick up the turtle and move it to (-100, 200)

Answers

Answer:

a) penup()

goto(-100, 200)

pendown()

Explanation:

The python program to indicate the location to begin writing the word can be

penup()

goto(-100, 200)

pendown()

# in python is use to add comment so it is incorrect.

all other option does not have correct syntex.

Answer:

B

Explanation:

ou want to configure the NTP daemon to receive time from pool.ntp.org. What entry should you place in the /etc/ntp.conf file?

Answers

Answer:

server pool.ntp.org

Explanation:

Complete the sentence to state a fact about procedural programming.
Another name for procedural programming Is

Answers

Answer:

Procedural programming is also referred to as imperative programming. Procedural programming languages are also known as top-down languages.

Answer:

imperative programming

Explanation:

Randomly choose rock, paper, or scissors for the computer
Ask the user to choose rock, paper, or scissors
Compare the computer’s choice to the player’s choice
Announce whether the computer or the human won
( In python.)

Answers

import random

computer_choice = random.choice(["rock", "paper", "scissors"])

user_choice = input("rock, paper, or scissors? ")

if computer_choice == user_choice:

   print("It's a draw!")

elif user_choice == "rock" and computer_choice == "scissors":

   print("You win!")

elif user_choice == "paper" and computer_choice == "rock":

   print("You win!")

elif user_choice == "scissors" and computer_choice == "paper":

   print("You win!")

else:

   print("The computer wins!")

I wrote my code in python 3.8. I hope this helps.

JAVA

Write a program to display the first ten terms of the series:
5, 10, 17, --------------​

Answers

Answer:

class Main {  

 public static void main(String args[]) {

   int a = 5;

   int delta = 5;

   for(int i=0; i<10; i++) {

       System.out.printf("%d, ", a);

       a += delta;

       delta += 2;

   }

 }

}

The letters after the name of a file indicate who created the file.
O True
O False

Answers

False gagajajdjakakaianjss
I guess it’s false ........

What is the scope of leftCharacter?

def rhyme(word):
leftCharacter = word[0]
if leftCharacter != 'd':
return 'd' + word[1:]
else:
return 'f' + word[1:]

def poem():
print("Enter Q to quit.")
userWord = input("Enter a word: ")
while userWord != 'Q' and userWord != 'q':
rhymeWord = rhyme(userWord)
print(rhymeWord)
userWord = input("Enter a word: ")

# the main part of your program that calls the function
poem()


the entire program

rhyme

poem

the main part of your program that calls the function

Answers

Answer:

Rhymeword

Explanation:

edge 2020

Answer:

The scope of leftCharacter is rhyme. I hope this helps you out. Have a wonderful and safe day. <3<3<3

Explanation:

How should you complete the code A - valid = false B- valid = true

Answers

Answer:

A. for an if-else statement in python, if the condition is false, The else statement is executed.

B. if the condition of the if-statement is true, the indented block of code is executed.

Explanation:

The if-statement is a conditional statement in programming for decision making. It is also known as branching as it makes decisions based on two paths. It comes with another keyword called 'else'.

The If-else statement makes a decision based on the output of a condition which is defined in the if-statement. If the condition is met, the code block just after the if-statement is executed, but the else-statement block is executed if otherwise.

What category of computer would you place an N.series Nokia phone​

Answers

Answer:

In the last category

Explanation:

Your welcome

The category of computer in which you would place an N-series Nokia phone​ is a portable computer.

What is a computer?

A computer is a digital electrical machine that may be configured to automatically perform arithmetic or logical functions. Programs are general collections of operations that modern computers can do. These programs allow computers to do a variety of jobs.

There are different categories of computers. A mobile phone falls in the category of a portable computer.

Therefore, the category of computer in which you would place an N-series Nokia phone​ is a portable computer.

Learn more about Computer:

https://brainly.com/question/21080395

#SPJ2

An online game is played with two dice. In this context, explain what is meant by decomposition.

Answers

Answer:

The answer to this question is given below in the explanation section.

Explanation:

This question is about desinging a game that is played with two dice and gets or shows their value to the player.

The dice value is random, and it can be between one and six. So, you need to generate two numbers between 1 and 6. You may also need to display the numbers

The main part of this program is that you need to know the numbers to limit or restrict what the user may do next while playing.

That's most of the first level of decomposition for solving a problem. In decomposition, you need to keep decomposing (breaking) the problem into smaller pieces, thinking outline of the program and deciding what objects, functions, variables, and logic you're going to implement in the coding.

what are the advantages of using ICT jn our society?​

Answers

Answer:

Communication - Speed / time – money can be saved because it's much quicker to move information around. With the help of ICT it has become quicker and more efficient. 2. Globalization - Video conferencing saves money on flights and accommodation.

Explanation:

hope this helped

Answer:

ICT has made global social and cultural interaction very easy. We now live in an interdependent global society, where people can interact and communicate swiftly and efficiently. News and information can now be transmitted in minutes. Individuals can easily stay in contact with members of their families who reside in other countries or make new friends across the world.

You are working from home and want to discuss a controversial topic. It is important you see the facial expressions of your coworkers during the meeting. The best way to conduct this meeting is using _______.

Answers

Answer:

Maintaing Focus and keeping the meeting comfortable and moving.

Explanation:

Answer:teleconference

Explanation:

‍♀️

---------------------- use of the Internet to access programs and data on computers that are not owned and managed by the user often using large data centers

Answers

Answer:

Cloud computing

Explanation:

Cloud computing is an information technology term that describes the process of using and applying online or internet services to access, and store data, including networking databases, and other data on computers.

It generally involves saving and accessing personal data and files created online (usually large data centers) without necessarily saving it on the PC hard drive.

Hence, in this case, thé correct answer is "Cloud Computing."

What can make an online interface difficult to use?​

Answers

Answer:

their is a lot miscomsuptions

Explanation:

The difficulty experienced by online interface users simply arises from the design principles associated with the structure of the interface.

The design of an online interface is best kept as simple as possible rather than a complicated user interface which becomes very difficult to navigate.

Another problem associated with design the use of overlapping textures or structures which often makes the user interface a whole lot more complicated.

Hence, the difficulty arising from using an online interface stems from the design.

Learn more : https://brainly.com/question/19117781

Determining Correct Date Function What function text would you use to put today's date and time in a cell? 0 =TODAYO =NOWO O NOWO) O TODAYO​

Answers

The function text that would you use to put today's date and time in a cell is B. =NOW()

What is a Time and Date Function?

This refers to the command that is given to a computer in order for it to render the correct time and date in a given cell.

Hence, we can see that from the answer choices, the best one that factors in both TIME AND DATE is =NOW() which is option B while option A is for the function that shows only the current date.

Read more about date functions here:

https://brainly.com/question/19416819

#SPJ1

You are writing a program using the Java language. Which of the following is a requirement of Java syntax?

Each statement must use sentence case.
Each statement must use the name of the program.
Each statement must begin with an operator symbol.
Each statement needs to end in a semicolon.

Answers

Answer:

The answer to this question is given below in the explanation section.

Explanation:

"D" option is correct

           "Each statement needs to end in a semicolon."

semicolon must use in program.without semicolon program doesn't accept.so each statement needs to end in a semicolon.

Match the term to the following definition. The exclusive legal right to
print, publish, perform, film, or record literary, artistic, or musical material,
and to authorize others to do the same?*
O Miranda Rights
O Coding
O Digital Footprint
O Copyright

Answers

d, copyright
trust me it’s right

List four kinds of human interest stories.

Answers

Answer:

List of kinds of human interest stories is described below in details.

Explanation:

A story that might be a good human interest account would be the vaccines for corona. Everyone these times is waiting despairingly for corona to stop. Speaking about a vaccine might provide them belief, and it would be delightful to understand how the scientist and physicians truly worry for the people. Maybe prompt them to wear the masks until the vaccines come out.

The illustration shows different types of text language.

Thought and speech bubbles labeled as follows: p l s, A S A P (all caps), L O L (all caps), b t w, R O T F L (all caps), B R B (all caps), t h x, g r 8.
Students who use text language in an online academic environment violate which rule of netiquette?

keeping content appropriate
practicing ethical behaviors
being considerate of others
respecting everyone’s time

Answers

Answer:

c. be consedirent of others

Explanation:

Answer:

It is A! :)

Got it right on edge!

There is a new security patch for the operating system on your personal computer. You are worried that the patch will stop your computer from working efficiently. What should you do?

Answers

Answer:

There is a new security patch for the operating system on your personal computer and the process that make it work efficiently is discussed below in details.

Explanation:

Patching is a method to restore a vulnerability or a defect that is recognized after the release of an application or software. Newly published patches can fix a virus or a security defect can assist to improve applications with new characteristics, fix a security vulnerability. Software updates are necessary because they usually incorporate critical patches to safety holes.

Sarah has an audio file to insert into a presentation, but she does not want the entire file to play. What should she do to have only a portion of the file play when the audio control is selected?

Create bookmarks.
Edit the file prior to inserting it into the presentation.
Use the Trim Audio dialog box.
Configure Audio styles.

Answers

Answer:

ITS THE 3 one good luck umm tell me if rong ummm sorry for the spelling

Answer:

Use the Trim Audio dialog box.

What is the primary purpose of the destination address?
Choose 1 answer:
It helps the router know where to send the packet.
B
It helps the receiving computer reassemble the packets.
It tells the router where the packet came from.
D
It helps the sending computer know how long to wait before retrying.
It prevents the packet from being intercepted by cybercriminals.

Answers

Answer:

The answer to this question is given below is the explanation section.

Explanation:

"A" option is correct

    It helps the router know where to send the packet.

Use the drop-down menu to complete the steps for editing a conditional formatting rule.

On the ___ tab, click the ___ group. On the Styles drop-down list, click ______. In the dialog box, select the rule, and click ________. Make the changes to the rule and click ok.

Answers

Answer:

The answer to this question is given below in the explanation section.

Explanation:

In excel you can formate excel sheet/column/row based on some condition.

you can specifiy these conditions while working on an excel sheet. It will help you to highlight certain information in the excel sheet.

Basically, you can use the rules to specify certain conditions, and based on that condition result, the cell/column or row gets highlighted with a certain color format, etc. However, you can create a new rule and modify the existing rules also.

As in the given question, you can implement this by going through the following steps.

On the Home tab, click the Conditional Formatting group. On the Styles drop-down list, click Manage Rules. In the dialog box, select the rule, and click Edit. Make the changes to the rule and click ok.

Answer:

home

styles

conditional formatting

manage rules

Explanation:

What is the most popular type or method of guaranteed reservation where booking transactions will be charged automatically?

Answers

Answer:

Credit cards.

Explanation:

When booking a reservation, the most popular type or method of making sure the reservation is guaranteed where booking transactions are charged automatics is the use of credit cards.

Why this is popular is because, the hotel, reserve or suite that is about to be booked will still receive their money even if the person that booked didn't show up.

Smart art can be used to create that highlight relationships between two items

Answers

Answer:

The answer to this question is given below in this explanation section.

Explanation:

A smart Art graphic is a visual representation of your information and ideas.you create one by choosing a layout this fits your message.Some layouts specific kind of information,while other simply enhance the appearance of a bulleted list.

    You can create a smart graphic in excel power point,word,or in an email message in outlook.The smart button is one the insert tab and developing on your screen size,may look like.

Other office program do not allow for smart art art graphic creation,but you can copy and paste smart graphics as image into those programs.As part of this process,when you are prompted to choose a type such as process hierarchy,or relationship.A type is similar to a category of smart art graphic,and each type contains several different layouts.

Because you can quickly and easily switch layouts,try different layouts until you find the one that best illustrate your message.

What is missing in the following program in order to have the output shown? numA = 24 while numA 3: numA = numA - 7 print(numA) OUTPUT: 3

Answers

Answer:

i got >

Explanation:

24 is > 3

Answer:

me too >

Explanation:

24 is greater than 3

How many lines are on a standard sheet of typing paper?

Answers

60 lines on the paper

What do you mean by computer. Write it use​

Answers

A computer is a machine that can be instructed to carry out sequences of arithmetic or logical operations automatically via computer programming. Modern computers have the ability to follow generalized sets of operations, called programs. These programs enable computers to perform an extremely wide range of tasks

You attempt to telnet to system 192.168.1.240. You receive the following message: "Connecting To 192.168.1.240...Could not open connection to the host, on port 23. No connection could be made because the target machine actively refused it." What may be the problem?

Answers

Answer:

firewall

Explanation:

The firewall could be used to protect the network from unauthorised access.Usually an ip could be whitelisted so it could transfer packets between allowing it connect through.

Why do attackers tend to target public or private Wi-fi networks?

Answers

Answer:

The answer to this question is given below in this explanation section.

Explanation:

A free WiFi connection in a public space can seem like a lifesaver when you are on the go.But if you decide to use public WiFi just be aware that you could be making yourself an easy target for hackers and putting your information and more at risk.

one of the dangers of using a public WiFi network is that data over this type of open  connection is often encrypted and  unsecured ,leaving you vulnerable to a man in the middle attack.It when a cyber criminal exploits a security  flaw in the network to intercept data

Avoid connecting to public WiFi connection. i if you must use a public WiFi hotpots also use a virtual privater network to secure your connection.Do not  log in to password protected websites that contains sensitive information when using a public WiFi connection for example banking and social networking sites or even email.Keep your software patched and up to date and all your devices even your mobiles ones to avoid any potential infection by viruses or malware if you do use unsecured public WiFi.

Other Questions
In 1947, after the independence of India, Jammu and Kashmir, Junagarh and Hyderabad did not sign the instrument of accession with India. Mention the reasons. When would a standardized table be useful in a health care setting? O A. When a doctor wants to track a patient's individual progress over the course of a year O B. When a doctor wants to show how the parts of a whole are divided O C. When a doctor wants to use a visual to help explain a procedure to a patient D. When a doctor wants to see how a patient is doing in comparison to others M Look at the photo pick A B C D either one explanation not needed thank you! to complete a task in 16 days a company needs Molecular iodine, I2(g)dissociates into iodine atoms at 625 K with a first-order rate constant of 0.271s-1What is the half-life for this reaction? Which statement below CANNOT be represented by the expression x - 10?a. 10 less than xb. x decreased by 10c. x less than 10d. 10 subtracted from x Which two statements describe the ocean floor? A. There are long underwater mountain chains. B. There are many active undersea volcanoes. C. It is covered with underwater forests of tall trees. D. It has only smooth surfaces between continental shelves. A and B is Correct What is a distinctive feature of a melody?OA singing.interval between notesOC. range of notesOD. repeats often hey um, so im learning ab percentages in my math class so can someone please explain to me how to solve percent problems if thats ok? thank you. If the sum of twice a number and four is eighteen, what is that number? Alexis and Paige work together as photographers for the local newspaper. Alexis is paid $25 for each news story she shoots and an additional $5 per picture. Paige makes $15 for each news story and $10 per picture. Write an expression to show how much the newspaper will pay if Alexis and Paige are hired together. Use p as the variable for pictures You have 4 black marbles, 3 green marbles and 5 red marbles in a bag. Whatis the probability of pulling out a black marble? How are digitized signals sent? Pizzazz I really need help! I only have little to spare, please make this count!!!What do we need to know to transcribe a note on the musical staff? If it gets louder or quieter Its form and interval If it speeds up or slows down Its pitch and duration Create a chart by calculating the heights of all the family members. Convert the heights in cm. Also find the average heights of your family. Compare your height with the average height and the height of your father.plz help me now Complete the proof.Drag and drop the expression to correctly complete the proof of the polynomial identity (xy)2+4xy=(x+y)2. List the six nitrogen bases that would pair with the following sequence of bases in a strand of DNA: T C G A C A Is the pronoun shown in bold intensive or reflexive?Elena showed herself to be the most qualified candidate for the promotion.intensive orreflexive What party? positioned itself against the weak Weimar government and the treaty of Versailles and bland the Jews for Germany problems In a small minority of schools across the nation, students do not earn grades; rather, they receive regular written and oral evaluations of their work. Some people believe that this is more effective for learning than the grading system, which they believe rewards students unevenly and encourages a competitiveness that is counterproductive to learning. How do you feel about this issue? Use specific reasons and examples to support your answer Steam Workshop Downloader