answer.
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]
2 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]2 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
Select the correct navigational path to freeze the top row of your worksheet. Select the panes you wish to freeze. Click the tab
Artemon [7]

Yeah, Your steps ar correct. Let's analyse those steps more easily by the following steps:

\Large{ \boxed{ \bf{ \color{aqua}{Freeze \: panes:}}}}

Freeze panes is a feature in spreadsheet applications, such as Microsoft Excel, LibreOffice Calc, and Google Sheets. It "freezes" a row or column, so that it is always displayed, even as you navigate the spreadsheet.

❍ Freezing panes is especially useful if your spreadsheet has a header row, that you want to always be visible.

  • Select the row below the row(s) you want to freeze. In our example, we want to freeze rows 1 and 2, so we'll select row.
  • Click the View tab on the Ribbon.
  • Select the Freeze Panes command, then choose Freeze
  • Panes from the drop-down menu. ...
  • The rows will be frozen in place, as indicated by the gray line.

<u>━━━━━━━━━━━━━━━━━━━━</u>

6 0
1 year ago
Read 2 more answers
Information gathered from observing a plant grow 3 cm over a two-week period results in _______.a. inferences. b. variables. c.
Leya [2.2K]

Answer:

The answer is d. Data

Explanation:

information gathered from observing a plant grow 3 cm over a two-week period results in Data

data is facts and statistics collected together for reference or analysis.

Data is any information that has been collected, observed, generated or created to validate original research findings

6 0
2 years ago
In this lab, you use the pseudocode in figure below to add code to a partially created Python program. When completed, college a
Elza [17]

Answer:

Python code is given below with appropriate comments

Explanation:

#Prompt the user to enter the test score and class rank.

testScore = input()

classRank = input()

#Convert test score and class rank to the integer values.

testScore = int(testScore)

classRank = int(classRank)

#If the test score is greater than or equal to 90.

if(testScore >= 90):

   #If the class rank is greater than or equal to 25,

   #then print accept message.

   if(classRank >= 25):

       print("Accept")

   

   #Otherwise, display reject message.

   else:

       print("Reject")

#Otherwise,

else:

   #If the test score is greater than or equal to 80.

   if(testScore >= 80):

       #If class rank is greater than or equal to 50,

       #then display accept message.

       if(classRank >= 50):

           print("Accept")

       

       #Otherwise, display reject message.

       else:

           print("Reject")

   

   #Otherwise,

   else:

       #If the test score is greater than or equal to

       #70.

       if(testScore >= 70):

           #If the class rank is greater than or equal

           #to 75, then display accept message.

           if(classRank >= 75):

               print("Accept")

           

           #Otherwise, display reject message.

           else:

               print("Reject")

       

       #Otherwise, display reject message.

       else:

           print("Reject")

4 0
2 years ago
Define and test a function myRange. This function should behave like Python’s standard range function, with the required and opt
Cerrena [4.2K]

Answer:

Study Python’s help on range to determine the names, positions, and what to do with your function’s parameters.

Use a default value of None for the two optional parameters. If these parameters both equal None, then the function has been called with just the stop value. If just the third parameter equals None, then the function has been called with a start value as well. Thus, the first part of the function’s code establishes what the values of the parameters are or should be. The rest of the code uses those values to build a list by counting up or down.

6 0
1 year ago
Read 2 more answers
Which statement below correctly differentiates between frames and bits? Frames have more information in them than bits. Frames a
9966 [12]
<span>Frames have more information in them than bits.
</span>
<span>Frames are made up of bits but not vice versa.


A bit (BInary digiT) is the basic unit of digital. It can be 0 (logical false, off) or 1 (not logical false - true, on). Four bits are in a nybble, which can have a value of 0 - 15, eight bits are in a byte which can have a value of 0 - 255. Words vary in size, they consist of multiple bytes and are generally correlated with the system's data bus/processor data width (a 64 bit system has an 8 byte word).
</span>
5 0
2 years ago
Read 2 more answers
Other questions:
  • Gaven's instructor told him to include a personal statement in his work portfolio. Why did his instructor recommend including a
    6·1 answer
  • Theresa is a certified teacher. She just had a baby and would like to stay home, but still wants to teach. Which career would be
    11·2 answers
  • When driving, your attention is __________.
    5·2 answers
  • . Write a recursive function names factorial to compute the factorial of the parameter. Also write the main function, where you
    15·1 answer
  • In your own words, what is pair-programming? What is the role of the driver? What is the role of the navigator? What are some be
    15·1 answer
  • Suppose the information content of a packet is the bit pattern 1110 0110 1001 1101 and an even parity scheme is being used. What
    15·1 answer
  • Mike has never used a slide software before, but he needs to create a presentation by the end of the week. what recourse would b
    8·1 answer
  • In cell J4, calculate
    8·1 answer
  • Calvin is an aspiring graphic designer. He wants to achieve Adobe Certified Expert certification in software that will be helpfu
    9·1 answer
  • Accenture has put together a coalition of several ecosystem partners to implement the principles of blockchain and Multi-party S
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!