subject

Adam is writing a program that: 1) has the user guess a number, and 2) tells the user how many guesses it took to get the correct answer. But when Adam tests the program, it always outputs that it took the user one guess, even when it takes many guesses. What error did Adam most likely make, and how should it be fixed? The difference between a for loop and a while loop is that a for loop is a loop that happens for a certain number of times. A while loop happens until a certain condition is met. How do you know when to use each one? Give specific examples in your answer. What are some programs that you have used that have condition-controlled loops and count-controlled loops? Why is it important that if, elif, and else statements appear in the proper order? What are some situations where you might find it useful to use the “!” symbol in a program? DON'T GET YOUR ANSER FROM A DIFERENT SITE PLZ

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 23:30
Show that there is a language a ⚆ {0, 1} â— with the following properties: 1. for all x â a, |x| ≤ 5. 2. no dfa with fewer than 9 states recognizes a. hint: you don’t have to define a explicitly; just show that it has to exist. count the number of languages satisfying (1) and the number of dfas satisfying (2), and argue that there aren’t enough dfas to recognize all those languages. to count the number of languages satisfying (1), think about writing down all the strings of length at most 5, and then to define such a language, you have to make a binary decision for each string about whether to include it in the language or not. how many ways are there to make these choices? to count the number of dfas satisfying (2), consider that a dfa behaves identically even if you rename all the states, so you can assume without loss of generality that any dfa with k states has the state set {q1, q2, . . , qk}. now think about how to count how many ways there are to choose the other four parts of the dfa.
Answers: 3
question
Computers and Technology, 22.06.2019 06:00
Write a program that uses a widgetviewer object to do the following: generate two random integers between 1 and 9 (inclusive). name one of them x, the other y. display them to the user using jlabel objects. create a jlabel object displaying the text "enter an operation number." create a jtextfield for the user's input. create a jbutton displaying the text "press here when you've entered your operation." use addandwait to add it to the widgetviewer object. when the user clicks the jbutton, evaluate operation in the following order to determine the one and only mathematical operation to perform on x and y. use a jlabel to display the result. if operation is between 1 and 10 inclusive, add x and y. if operation is evenly divisible by 4, subtract y from x. if operation is evenly divisible by 5, use integer division to divide y into x. if operation is an even number, use floating point division to divide y into x. if none of the other tests on operation apply, multiply x and y. note: operation can be negative or zero.
Answers: 2
question
Computers and Technology, 22.06.2019 20:00
Need asap write a short paper describing the history and differences between six sigma, waterfall, agile, and scrum models. understanding these models can give you a good idea of how diverse and interesting it development projects can be. describe what the rationale for them is and describe their key features. describe the history behind their development. at least 400 words
Answers: 1
question
Computers and Technology, 23.06.2019 09:30
Write an essay on online collaboration, how to do it, the challenges, resolving the challenges, and consider whether the risks are greater than rewards. ( need )
Answers: 1
You know the right answer?
Adam is writing a program that: 1) has the user guess a number, and 2) tells the user how many guess...
Questions
question
Mathematics, 06.07.2019 17:00
question
Mathematics, 06.07.2019 17:00
question
Mathematics, 06.07.2019 17:00
Questions on the website: 13722360