Answer:
-1 (out of range).
Explanation:
Index '7' cannot exist in 0-indexed array of size '6'.
If return type is 'Integer' out-of-range exception should be thrown.
[ 0, 1, 2, 3, 4, 5] :: indices. (length = 6)
[ 5, 6, 10, 7, 3, 2.5 ] :: elements.
Answer: 7
Explanation: got it right on edgen
Assignment 4: Evens and Odds
Write a program that will ask a user for how many numbers they would like to check. Then, using a for loop, prompt the user for a number, and output if that number is even or odd. Continue doing this as many times as the user indicated. Once the loop ends, output how many even numbers were entered and how many odd numbers were entered.
Hint: For a number to be even, when the number is divided by 2, there should be no remainder - so you will want to use the modulus (%) operator.
Hint: You will need two count variables to keep track of odd and even numbers.
Sample Run 1
How many numbers do you need to check? 5
Enter number: 20
20 is an even number.
Enter number: 33
33 is an odd number.
Enter number: 4
4 is an even number.
Enter number: 77
77 is an odd number.
Enter number: 8
8 is an even number.
You entered 3 even number(s).
You entered 2 odd number(s).
Sample Run 2
How many numbers do you need to check? 3
Enter number: 10
10 is an even number.
Enter number: 3
3 is an odd number.
Enter number: 400
You entered 2 even number(s).
You entered 1 odd number(s).
Benchmarks
Prompt the user to answer the question, “How many numbers do you need to check? “
Create and initialize two count variables - one for odd and one for even.
Based on the previous input, create a for loop that will run that exact number of times.
Prompt the user to “Enter number: “
If that number is even, output “[number] is an even number.”
Update the even count variable.
Or else if the number is odd, output “[number] is an odd number.”
Update the odd count variable.
Output “You entered [number] even number(s).”
Output “You entered [number] odd number(s).”
n = int(input("How many numbers do you need to check? "))
odd = 0
even = 0
i = 0
while i < n:
num = int(input("Enter number: "))
if num % 2 == 0:
even += 1
print(str(num)+" is an even number")
else:
odd += 1
print(str(num)+" is an odd number")
i += 1
print("You entered "+str(even)+" even number(s).")
print("You entered "+str(odd)+" odd number(s).")
I hope this helps!
The program allows user to enter a specified number of values and displays if the number is even or odd ; The program written in python 3 goes thus :
num_inputs = int(input('number of inputs : '))
#prompts user to enter a specified Number of inputs
count = 1
#keeps of the number of inputs supplied
while count <= num_inputs :
#iterate using a while loop
your_num = int(input('Enter a number : '))
#prompts user to enter an integer value
count+=1
#increase counter by 1
if your_num%2 == 0 :
#checks if number is even
print('even number')
else:
print('odd number')
A sample run of the progam is attached below.
Learn more :https://brainly.com/question/20720413
please help!
I think the answer the the question is C
The power of if worksheet
Does anybody know the answer to 5.7.5: Factorial of Code HS? I can’t figure it out
In this exercise we have to use the knowledge of computational language in JAVA to describe a code, like this:
The code can be found in the attached image.
To make it easier the code can be found below as:
function myFunction(num){
n = 0;
total = 1;
while (n < num){
total *= (num - n);
n+=1;
}
return total;
}
alert(myFunction(6));
See more about JAVA at brainly.com/question/2266606
Rachel wants to copy eight rows of data from one spreadsheet to another. She opens the spreadsheet, highlights the appropriate data,
and selects the Copy command from the menu. What should she do next?
O Select the Cut command from the menu.
O Open the new spreadsheet.
O Double-click on the cells that are highlighted.
Select the Paste command from the menu,
Save and Exit
Answer:
Rachel should open the new spreadsheet first. Then she can paste the cells she has copied.
Answer:
Explanation:
Rachel should open the new spreadsheet first. Then she can paste the cells she has copied.
what is the main purpose of a web crawling program
A.two index web pages for quick retrieval full of content B.turn create meta tags for web contact C. to search illicit or illegal web activity D.to convert keywords to HTML
Please ANSWERRRRR
Answer:
the answer is A because Web crawlers enable you to boost your SEO ranking visibility as well as conversions.
Explanation:
What prevents someone who randomly picks up your phone from sending money to themselves using a messenger-based payment?
Answer:
Explanation:
There are various safety features in place to prevent such scenarios from happening. For starters phones usually have a pin code, pattern code, or fingerprint scanner which prevents unauthorized individuals from entering into the phone's services. Assuming that these features have been disabled by the phone's owner, payment applications usually require 2FA verification which requires two forms of approval such as email approval and fingerprint scanner in order for any transactions to go through. Therefore, an unauthorized individual would not have access to such features and would not be able to complete any transactions.
The feature which prevents someone who randomly picks up your phone from sending money to themselves using a messenger-based payment is:
Security features like passwords or authentication codesIn a messenger-based payment system, there exists various safety features which prevents unauthorised use of the system to send money fraudulently. Some of these features include:
PasswordsPersonal Identification Number (PIN)Two factor authentication (2FA)As a result of this, we can see that these features prevent someone from making unauthorised money transfers.
Read more here:
https://brainly.com/question/19469131
A Document's Format is??
Answer:
A text or binary file format for storing documents on a storage media, especially for use by computers.
Explanation:
Answer:
The shape, size, design, and arrangement of its physical elements
Explanation:
MS Excel is word processing software true or false
Answer:
Explanation:
Microsoft Excel is a spreadsheet program used for calculations, making charts and recording data about all sorts of business processes.
Answer:
false
Explanation:
Microsoft Excel is a spreadsheet program used for calculations, making charts and recording data about all sorts of business processes.
PLEASE HELP!!! 18 points
Write the SQL query that would search a table called Movies and return the titles
of movies that were made in 1975.
Answer:
Vertigo | 1958 | 128 | English | 1958-08-24 | UK
902 | The Innocents | 1961 | 100 | English | 1962-02-19 | SW
903 | Lawrence of Arabia | 1962 | 216 | English | 1962-12-11 | UK
904 | The Deer Hunter | 1978 | 183 | English | 1979-03-08 | UK
905 | Amadeus | 1984 | 160 | English | 1985-01-07 | UK
906 | Blade Runner | 1982 | 117 | English | 1982-09-09 | UK
907 | Eyes Wide Shut | 1999 | 159 | English | | UK
908 | The Usual Suspects | 1995 | 106 | English | 1995-08-25 | UK
909 | Chinatown | 1974 | 130 | English | 1974-08-09 | UK
910 | Boogie Nights | 1997 | 155 | English | 1998-02-16 | UK
911 | Annie Hall | 1977 | 93 | English | 1977-04-20 | USA
912 | Princess Mononoke | 1997 | 134 | Japanese | 2001-10-19 | UK
913 | The Shawshank Redemption | 1994 | 142 | English | 1995-02-17 | UK
914 | American Beauty | 1999 | 122 | English | | UK
915 | Titanic | 1997 | 194 | English | 1998-01-23 | UK
916 | Good Will Hunting | 1997 | 126 | English | 1998-06-03 | UK
917 | Deliverance | 1972 | 109 | English | 1982-10-05 | UK
918 | Trainspotting | 1996 | 94 | English | 1996-02-23 | UK
919 | The Prestige | 2006 | 130 | English | 2006-11-10 | UK
920 | Donnie Darko | 2001 | 113 | English | | UK
921 | Slumdog Millionaire | 2008 | 120 | English | 2009-01-09 | UK
922 | Aliens | 1986 | 137 | English | 1986-08-29 | UK
923 | Beyond the Sea | 2004 | 118 | English | 2004-11-26 | UK
924 | Avatar | 2009 | 162 | English | 2009-12-17 | UK
926 | Seven Samurai | 1954 | 207 | Japanese | 1954-04-26 | JP
927 | Spirited Away | 2001 | 125 | Japanese | 2003-09-12 | UK
928 | Back to the Future | 1985 | 116 | English | 1985-12-04 | UK
925 | Braveheart
Explanation:
hope this helped please mark me branliest let me know if you have questions :)
inputs and outputs that allow a user to interact
with a piece of software
I do not understand what you are asking
HURRY! PLEASE ANSWER! What additional lenses would be most beneficial to add to your collection and why?
How can we work together to fix problems with our websites
The question "How can we work together to fix problems with our websites" is not peculiar to programmers who are consulted to solve a website problem.
The best response to the question includes we will"
add a value propositioncreate a website navigationcall to action textcall to action colorstry the 10-foot testuse a social proofcreate a testimonial pages.Read more about website problem
brainly.com/question/25537936
Assignment 4: Evens and Odds
Need help on this
Answer:
any even number plus 1 is odd
Which is more compact?
- Binary
- ASCII decimal
- Hexadecimal
- BASE64
WHY?
Answer:
ASCII85 is the most efficient coding system – data size increases by just 20%. It has a couple of minor disadvantages. It uses a larger character set, and so it is only compatible with ASCII (unlike Base64, which supports various close relatives of ASCII). It is also slightly more demanding computationally, since it uses division rather than bit shifting. However, these factors are becoming increasingly irrelevant in the context of modern computer systems. The main reason that Base64 continues to be used more than ASCII85 is probably the simple fact that it has been around for longer.
Explanation:
Which of the following is a type of input device?
Speakers
Touchscreen
Monitor
Hard drive
Answer: Touchscreen
Explanation:
The type of input device is a touchscreen.
The following information should be considered:
It is the device that is applied for providing the data & controlling the signals to the system like keyboards, mouse, touchscreen, etcThe monitor, speakers & hard drive are not considered as the input device.Therefore we can conclude that the type of input device is a touchscreen.
Learn more about the device here: brainly.com/question/6277363
Differentiate between traditional majlis and modern majlis...
GIVE IN TABE FORM
Answer:
Traditional majlis
The traditional Majlis is usually a large room that is either separate from the main house or in the house but with its own entrance. This is largely due to the Arabic traditions which values the privacy of the house. Since the Majlis often has its own separate entrance you have to design a welcoming entryway.
Modern majlis
The modern majlis design is delicate and luxuriously styled. The quality of the materials and their combinations are an important part of the style. Small details, gold inserts, rims, carved moldings create the desired luxury of the attention to ceiling illumination and lights fixtures.
Explanation:
Which UAS construction material is the lightest, easiest to shape, and easiest to repair?
a. plastic
b. titanium
c. foam
d. fiberglass
Answer: Plastic
Explanation:
It is light weight, easy to repair, malleable, and used for many easy to use products.
Answer:
Plastic
Explanation:
If like dog get point..
I like dogs.
I have got one named Snupy.
Answer: Husky’s just saying..They are pretty animals.
Explanation:
Please answer my question y'all!
Answer:
Explanation:1000 mp3s
What type of business document is used to
communicate inside the company?
Answer:
Where’s your answer choices
Explanation:
Put it in the comments and I’ll do the same
Fill in the blank to complete the sentence.
If you only want to use the localtime function, you can load just that one function into active memory using the following line of code.
from________ import localtime()
Answer:Explanation:
its time
The Basic Input-Output Operating System (BIOS), which is stored in the computer's read-only memory (ROM) microchip, reads the time from the memory in the real-time clock chip when the computer is turned on.
What is the local time function relation with active memory?The local time() function transforms a time value expressed in seconds to a Tm structure. The local time() method transforms a time val to job locale time using an assumption that the time val is in Universal Coordinate Time (UTC).
A real-time clock (RTC) is a battery-operated clock that is built into a motherboard microchip.
The term “the CMOS” is frequently used to refer to this microchip, which is typically distinct from the microprocessor and other chips (complementary metal-oxide semiconductor).
Therefore, you can load just that one function into active memory using the line of code.
Learn more about local time here:
https://brainly.com/question/28149671
#SPJ2
some people believe that one day space travel will be for everyone what do you think.
Answer:
It could be true. When we go into the future we see settling on mars. Soon there may be a type of rocket travel for the public to use.
Explanation:
What happens if you create multiple accounts just to get points faster?
When you create multiple accounts just to get points faster, it does not help as the points will be to the individual account and as such it will not be faster but slower.
Can having multiple accounts quickly hurt your points?If a person has a lot of accounts, you have to know that it may have negative effect on your score.
Conclusively, Credit scores or point are not influenced by the number of bank accounts or other account that you have in your name and as such having a lot of account will not increase your points.
Learn more about multiple accounts from
https://brainly.com/question/25787382
What is the result when you run the following line of code after a prompt??
>>>print(3 + 11)
Answer:
The following output is 14
Explanation:
When you print something, python interprets it and spits it out to the console. In this case, python is just interpreting 3 + 11, which equals 14. Thus, making the answer 14.
hope i helped :D
Answer:
14
Explanation:
network does not provide security to us
Answer:
May this answer be helpful for you
Explanation:
1.False.
1.False. 2.Network security has many policies which ensure the secure surfing of the internet.
1.False. 2.Network security has many policies which ensure the secure surfing of the internet. 3.The policies do not allow unauthorized access. 4.Thus, network does provide security to us.
What number will be output by the console.log command on line 5?
A. 10
B. 25
C. 30
D. 35
Answer:
The output is 35
Explanation:
Required
Determine the output on line 5
We start by analysing the program line by line.
On line 1: kit = 20
On line 2: roo = 10
On line 3: kit = kit + 5
Substitute 20 for kit.
So, we have
kit = 20 + 5
kit = 25
On line 4:
roo = kit + roo
Substitute values for kit and too
roo = 25 + 10
roo = 35
On line 5: Output roo
So, 35 is displayed as an output
Write a program that prompts the user to input a positive integer. It should then output a
a message indicating whether the number is a prime number.
(Note: An even number is prime if it is 2. An odd integer is prime if it is not divisible by any odd
integer less than or equal to the square root of the number.)
num = -1
count = 0
while num < 0:
num = int(input("Enter a positive number: "))
if num % 2 == 0:
if num == 2:
print(str(num)+" is a prime number")
else:
print(str(num)+" is not a prime number")
else:
for x in range(1, int(num**0.5)+1,2):
if num % x == 0:
count += 1
if count > 1:
print(str(num)+" is not a prime number")
else:
print(str(num)+" is a prime number")
I hope this helps!
A thesaurus is an example of a(n)
A)blog.
B)e-book.
C)e-zine.
D)online reference.
Answer:
D. online reference
Explanation:
An "online reference" refers to a digital reference that end users may utilize for their work or other daily activities. For example, if a person is looking for the synonym of a particular word, she may then refer to the thesaurus.
A blog is a website where you can find personal journals from different writers.
An e-book is an "electronic book." This allows people to read book digitally.
An e-zine is an "electronic magazine." This is a magazine in its digital form.
Answer:
online reference :)))
Explanation:
Question #6
ent
Fill in the Blank
You have defined your player data type.
class player:
life = 3
magic = False
name = "
You created an instance of your player data type and assigned values.
myPlayer = player()
myPlayer.life = myPlayer.life - 1
myPlayer.life = 4
myPlayer.magic = True
myPlayer.name = 'Kris'
What will be the value displayed after this line of code?
print(myPlayer.life)
You will see
Answer:
The answer is 4
Proof