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
Hatshy [7]
2 years ago
13

A company wants to transmit data over the telephone, but they are concerned that their phones may be tapped. All of their data i

s transmitted as four-digits. They have asked you to write a program that will encrypt their data so that it may be transmitted more securely. Your program should read a four-digit integer and encrypt it as follows: 1. Replace each digit by (the sum of that digit and 3) modulus 10. Then 2. Swap the first digit with the third, and swap the second digit with the fourth. 3. Print the encrypted integer.
Computers and Technology
1 answer:
erastovalidia [21]2 years ago
6 0

Answer:

def encrypt_digit(digit):

   if type(digit) is int or float:

       digit = str(digit)

   hold = list()

   for x in digit:

       d = str((int(x) + 3)%10)

       hold.append(d)

   first = hold.pop(0)

   second = hold.pop(0)

   third = hold.pop(0)

   fourth = hold.pop()

   print(int("".join([third,fourth, first, second])))

encrypt_digit(7836)

Explanation:

The python function accepts a four-digit parameter which represents the data transmitted over the company's telephone network. The function encrypts the data by adding 3 to each digit and getting the modulus of division 10, then the digits are swapped and printed out encrypted and ready for transmission.

You might be interested in
A well-diversified portfolio needs about 20-25 stocks from different categories is this True or False?
borishaifa [10]

Usually they hold 15-20 as the minimum of the portfolios

So I would say True

3 0
3 years ago
Read 2 more answers
you have a shop in Salem, Illinois, that sells specialty chocolates. Some customers from France have started placing orders. Whi
Vladimir79 [104]

The data regulation which you must adhere to for your sales to France is known as: D. the General Data Protection Regulation.

<h3>What is GDPR?</h3>

GDPR is an acronym for General Data Protection Regulation and it can be defined as a legal framework that was enforced on the 25th of May 2018, so as to sets guidelines for business firms during the collection, processing and use of personal information from individuals that are residing in the European Union (EU) and the European Economic Area such as:

  • Germany
  • France
  • England
  • Spain

This ultimately implies that, the General Data Protection Regulation is a data regulation which you must adhere to for your sales to France.

Read more on GDPR here: brainly.com/question/27416494

#SPJ1

4 0
2 years ago
Thomas owns a small Web services company and currently owns and maintains all his own computing hardware. He plans to develop an
Stels [109]

Answer: Hello the options related to your question is missing attached below are the options

answer : unlimited computing capacity for a low monthly fee ( A )

Explanation:

Since Thomas plans to develop a new service that will require his computing capacity to either double or triple, The best way of transitioning to the public cloud that might help Thomas meet up the requirement is Using unlimited computing capacity for a low monthly fee

7 0
2 years ago
When is it appropriate to use images in presentations?
Svetach [21]
The answer to the question is c
7 0
3 years ago
Read 2 more answers
Output values below an amount Write a program that first gets a list of integers from input. The input begins with an integer in
Katarina [22]

The program that first gets a list of integers from input, gets the last value from the input, which indicates a threshold, and outputs all integers less than or equal to that last threshold value is:

import java.util.Scanner;

public class LabProgram {

 /* Define your methods here */

public static void main(String[] args) {

Scanner scnr = new Scanner(System.in);

int[] userValues = new int[20];

int upperThreshold;

int numVals;

numVals = scnr.nextInt();

GetUserValues(userValues, numVals, scnr);

upperThreshold = scnr.nextInt();

OutputIntsLessThanOrEqualToThreshold(userValues, numVals, upperThreshold);

}

}

Read more about java programming here:

brainly.com/question/26952414

#SPJ1

6 0
1 year ago
Other questions:
  • Consider the following class definitions. public class BClass { private int x; public void set(int a) { x = a; } public void pri
    11·1 answer
  • Write the execution steps if the input is a lion.
    11·1 answer
  • How do you change brightness on acer laptop?
    7·1 answer
  • The ____ command will confirm the system directory that you are currently in
    13·1 answer
  • Why is it important to begin development of a software solution with a programming design in place? A programming design summari
    11·2 answers
  • In addition to MLA, what are some other widely used style guides? Check all that apply.
    5·1 answer
  • The area of a rectangle is the rectangle's length times its width.
    5·1 answer
  • An email message containing a warning related to a non-existent computer security threat, asking a user to delete system files f
    6·1 answer
  • A soft news story and a feature story are the same thing.<br> O True<br> O False<br> HELLPP ASSAAAP
    12·2 answers
  • A text that presents an event and describe what happens as a result is an example of what text structure
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!