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
wariber [46]
3 years ago
6

A program is written to compute the sum of the integers from 1 to 10. The programmer, well trained in reusability and maintainab

ility, writes the program so that it computes the sum of the numbers from k to n. However, a team of security specialists scrutinizes the code. The team certifies that this program properly sets k to 1 and n to 10; therefore, the program is certified as being properly restricted in that it always operates on precisely the range 1 to 10.
Required:
List different ways that this program can be sabotaged so that during execution it computes a different sum, such as 3 to 20.
Computers and Technology
1 answer:
Liula [17]3 years ago
3 0

Answer:

See explanation

Explanation:

An instance of such program written in python is

isum = 0

for i in range(1,11):

isum = isum + i

print(sum)

One of the ways the program can give a wrong result is when someone alters the program source program before it's complied and executed.

Take for instance.

Changing

isum = 0 to isum = 4

will alter the result by additional 4

Another way is if an outside program or process alters the program execution.

You might be interested in
Search the web to discover the 10 most common user-selected passwords, and store them in an array. Design a program that prompts
Airida [17]

Answer:

userpassword = {"123456",

"password",

"123456789",

"12345678",

"12345",

"111111",

"1234567",

"sunshine",

"qwerty",

"abc123"}

#We define the function that prompts the user for a password

def user_passinput():

   password = input("Choose enter a password: ")

   return password

#Function that checks the password

def check_password():

   count = 0

   check_pass = user_passinput()

   if check_pass in userpassword:

       print("Yay!! you entered the correct password")

   elif count <10:

           count = count+1

           print("Please try again")

          user_passinput()

   else:

       print ("Maximum tries exceeded")

check_password()

Explanation:

Using Python for this code, in the first line of the code, we list the dictionary of 10 most common passwords searched on the web. In line 12, we define the function that will demand the user to enter a password and return the value the user entered. Line 16 defines the function that checks if the password is common and prints to the screen either "Yay!! you entered the correct password", "Please try again" or "Maximum tries exceeded" depending on the condition that is satisfied. The last line of the code calls the check_password() function, which actually initiates the designed program.

7 0
4 years ago
Have you ever had an incorrect perception about someone else?
Soloha48 [4]
Yes, all the time. Sometimes, it's feeling based. You get a bad vibe from someone, and you tend to go without without really giving said person a chance. Sometimes those vibes are helpful, sometimes it's you overreacting from bad experiences. (: hope all is well!
7 0
4 years ago
Help with scripting/coding questions!
user100 [1]

Answer:

Explanation:

For the first questions the variable's name is <u>Today,</u> and is declared like a date variable, this will be returned a date value.

For the second question, where the browser will show today's date because with the variable Today, we get the date and with the document.write(Today) is shown the variable information.

With the third question, the result will be "Hello!", because the August is the 8 month, and July the 7, in this case the IF is False and for that will show "Hello!".

5 0
3 years ago
Write program to calculate the sum of the following series where in is input by user. (1/1 + 1/2 + 1/3 +..... 1/n)
Lorico [155]

Answer:

#here is code in Python.

#read the value n from user

n=int(input("enter the value of n:"))

#variable to store the total sum

sum_n=0

for i in range(1,n+1):

# find the sum of series

   sum_n=sum_n+1/i

#print the sum

print("sum of the series is: ",sum_n)

Explanation:

Read the value of n from user. Create and initialize a variable sum_n with 0. Run a for loop to calculate sum.Initially sum_n is 0, then for value of i=1  1/i will be added to the sum_n.Then in next iteration for i=1, 1/2 added to sum_n. Similarly loop will run util i equals to n.Then sum_n will store the sum of the

series.

Output:

enter the value of n:5

sum of the series is:  2.283333333333333

3 0
4 years ago
Using the POP standard for client to server e-mail communication, the e-mail messages remain on the server computer. True False
Gelneren [198K]

Answer:

False

Explanation:

8 0
3 years ago
Other questions:
  • What did the use of steam engines in printing presses lead to the development of?
    14·1 answer
  • An intranet is a way for a company or organization to protect copyrighted and other important information?
    15·2 answers
  • Which step of the machine cycle examines the op-code of the next instruction to be executed?
    12·2 answers
  • "The pkill command terminates _________."
    14·1 answer
  • Operating software is a must in every software (a) True (b) False
    8·1 answer
  • What are 5 ways we can reduce our energy?
    5·1 answer
  • Complete the output for the following program?
    10·1 answer
  • Which is an example of continuous delivery?
    11·1 answer
  • Choose a topic related to a career that interests you and think about how you would research that topic on the Internet. Set a t
    14·1 answer
  • 1
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!