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
jok3333 [9.3K]
4 years ago
14

Create a different version of the program that: Takes a 3-digit number and generates a 6-digit number with the 3-digit number re

peated, for example, 391 becomes 391391. The rule is to multiply the 3-digit number by 7*11*13. Takes a 5-digit number and generates a 10-digit number with the 5-digit number repeated, for example, 49522 becomes 4952249522. The rule is to multiply the 5-digit number by 11*9091.
Computers and Technology
1 answer:
alukav5142 [94]4 years ago
4 0

Answer:

#1

threedigit = int(input("Enter any three digit: "))

if not(len(str(threedigit)) == 3):

     print("Input must be three digits")

else:

     print(str(threedigit * 7 * 11 * 13))

#2  

fivedigit = int(input("Enter any five digit: "))

if not(len(str(fivedigit)) == 5):

     print("Input must be five digits")

else:

     print(str(fivedigit * 11 * 9091))

Explanation:

First program begins here

#1

This line prompts user for input of three digits

threedigit = int(input("Enter any three digit: "))

The following if condition checks if user input is exactly 3 digits

if not(len(str(threedigit)) == 3):

     print("Input must be three digits")

else:

     print(str(threedigit * 7 * 11 * 13)) -> This line is executed if input is 3 digits

Second program begins here

#2  

This line prompts user for input of five digits

fivedigit = int(input("Enter any five digit: "))

The following if condition checks if user input is exactly 3 digits

if not(len(str(fivedigit)) == 5):

     print("Input must be five digits")

else:

     print(str(fivedigit * 11 * 9091)) -> This line is executed if input is 5 digits

You might be interested in
Which of the following is an Internet supervisory protocol? O DNS IP O both A and B O neither A nor B
skelet666 [1.2K]

Answer: Both A and B (DNS and TCP/IP)

Explanation: Internet supervisor protocols are the protocols that  have the supervising standards for the internet functioning. DNS (Domain name system)is the system that supervises the internet by the function of the domain names that is accessed by the user.It acts like phone phone book  that coverts the domain to the IP address.

TCP/IP is the(Transfer control protocol/Internet protocol) are the protocols that help in the function of the internet by providing the connection with the network.The internet runs with help of TCP/IP suite.Thus both, DNS and TCP/IP are supervisory protocol for internet.

6 0
3 years ago
Answer all of the questions,
Phantasy [73]

Answer:

sry but I don't know the answer

5 0
3 years ago
Can you guys give some samples of STEM-related studies?​
anygoal [31]

Answer:

D :)))))

Explanation:

hope this helps

5 0
3 years ago
Read 2 more answers
A Computer Programmer who wants to be surrounded by a large number of like-minded coworkers should take a job with one of the na
vichka [17]

Answer:

C

Explanation:

This job will have the largest amount of 1. computer programmers, 2. like-minded coworkers, and 3. a large number of like-minded coworkers.

Please give Brainliest if accurate!

7 0
3 years ago
Read 2 more answers
Suppose that outFileis an ofstreamvariable and output is to be stored in the file outputData.out. Which of the following stateme
BlackZzzverrR [31]

Answer:

Option b outFile.open("outputData.out");

Explanation:

In C++, there are several classes given to handle output and input of characters to or from files. They are:

  • ofstream that write on files
  • ifstream that read from files

We can use an object of ofstream to hold the contents that we wish to output to an external file. The general syntax is as follows:

           ofstream_obj.open(file_name)

This will create a file with a specific file name and it possesses all the contents from the obstream_obj.

5 0
3 years ago
Other questions:
  • True false you cannot fill in a callout​
    14·1 answer
  • Differentiate among web apps, mobile apps, and mobile web apps.
    14·2 answers
  • Describe one type of technology that is useful in producing images from space.
    9·1 answer
  • Moderate changes to existing processes falls under the _________ analysis. Business Process Automation (BPA) Business Process Im
    5·1 answer
  • What is the output of the following program when the method is called with 4?
    11·1 answer
  • Full form of NCP?............
    5·2 answers
  • If a system contains 1,000 disk drives, each of which has a 750,000- hour MTBF, which of the following best describes how often
    15·1 answer
  • For 8.6 code practice: Question 1 It keeps says it's an infinite loop and it will not work can someone give me the code that wil
    9·1 answer
  • We call any device connected to the Internet a(n) ________. Group of answer choices router host IP client
    9·1 answer
  • A network administrator wants to authenticate server machines using Transport Layer Security (TLS). What can the administrator i
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!