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
timofeeve [1]
2 years ago
11

Assignment 4 evens and odds

Computers and Technology
1 answer:
Viefleur [7K]2 years ago
4 0

I've added my own code in a picture below. I didnt really notice any error, which would cause problems in your code. The main issues I had with your code is purely readability. You should start using the format function along with the curly brackets to concatenate variables into strings. You should also start doing even += 1 instead of even = even + 1. I also tweaked your range function. Simply putting n makes it much easier to read and understand.

You might be interested in
Select the correct answer.
CaHeK987 [17]

Answer:

C. FTP

Explanation:

FTP is a network protocol for transmitting files between computers.

5 0
2 years ago
Why did the editors choose to rearrange the intercutting between Luke’s story and the Imperials? What effect did this have on th
kompoz [17]

Answer:

Though it has its merit, know that the rule is not mandatory. ... A jump cut is a cut in film editing in which two sequential shots of the ... An intercut is a type of edit where two or more actions in distinct ...

3 0
3 years ago
Lisa manages incident response for a bank. The bank has a website that’s been attacked. The attacker utilized the login screen,
kari74 [83]

Answer:

The answer is C) SQL Injection

Explanation:

Cross-Site Scripting (XSS) attacks are a type attacks that occur when an attacker uses a web application to send malicious code, generally in the form of a browser side script, to a different end user.

Cross-Site Request Forgery (CSRF) is a type of attacks specifically target state-changing requests, not theft of data, since the attacker has no way to see the response to the forged request.

SQL Injection is a type of cyber security attack where an attacker inputs a malicious input into an SQL statement., and the SQL server reads it as programming code.

Address Resolution Protocol poisoning (ARP poisoning) is a form of attack in which an attacker changes the Media Access Control (MAC) address and attacks an Ethernet LAN by changing the target computer's ARP cache with a forged ARP request and reply packets.

From the above brief definition; it is seen that the answer is C) SQL Injection.

3 0
3 years ago
Write a script that creates and calls a stored procedure named test. This procedure should use a transaction that includes the s
natita [175]

Answer:

Check the explanation

Explanation:

use `my_guitar_shop`;

#delete the procedure test if it exists.

DROP PROCEDURE IF EXISTS test;

DELIMITER //

CREATE PROCEDURE test ()

BEGIN

   #declare variable sqlerr to store if there is an sql exception

  declare sqlerr tinyint default false;

   #declare variable handler to flag when duplicate value is inserted

  declare continue handler for 1062 set sqlerr = TRUE;

   #start transaction

   start transaction;

  delete from order_items where order_id in

      (select order_id from orders where customer_id=6);

  delete from orders where customer_id=6;

  delete from addresses where customer_id=6;

  delete from customers where customer_id=6;

 

   if sqlerr=FALSE then

      commit;

        select 'Transaction Committed' as msg;

  else

       rollback;

       select 'Transaction rollbacked' as msg;

   end if;

end //

delimiter ;

call test();

8 0
3 years ago
The strength of gravity on the Moon is 1.6
sergeinik [125]

Answer:

Mass = 80kg

Explanation:

Given

On Earth

Mass = 80kg

On the moon

g = 1.6N/kg

Required

The astronaut's mass on the moon

The mass of an object do not change base on location

So, if the mass of the astronaut is 80kg on earth, it will be 80 kg on the moon.

Hence:

Mass = 80kg

6 0
3 years ago
Other questions:
  • When a dynamic array with a class for a base type is declared, which constructor is called?
    5·1 answer
  • If you specify a user without specifying a hostname, mysql will
    13·1 answer
  • Which of the following can you use to add a picture to your presentation?
    14·1 answer
  • Given a string, convert the characters of the string into opposite case,i.e. if a character is lower case than convert it into u
    12·1 answer
  • no one can succeed in his or her career without relying on others for help or opportunities. It’s best, though,
    13·1 answer
  • What is does ram means,??
    7·2 answers
  • 1. Build and test D-type Flip-Flop using a built-in SR flip-flop.
    12·1 answer
  • Which code snippet calculates the sum of all the even elements in an array values? Group of answer choices int sum = 0; for (int
    8·1 answer
  • _______________ ________________ have human editors that evaluate, select, and organize websites into a hierarchy of categories.
    11·1 answer
  • Difference between website and web server
    6·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!