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
Write a loop to populate the list user_guesses with a number of guesses. The variable num_guesses is the number of guesses the u
Masja [62]

Answer:

num_guesses = int(input())

user_guesses = []

for i in range(num_guesses):

    x = int(input())

    user_guesses.append(x)

   

print(user_guesses)

Explanation:

This solution is provided in Python

This line prompts the user for a number of guesses

num_guesses = int(input())

This line initializes an empty list

user_guesses = []

This loop lets user input each guess

for i in range(num_guesses):

This line takes user input for each guess

    x = int(input())

This appends the input to a list

    user_guesses.append(x)

This prints the user guesses    

print(user_guesses)

6 0
1 year ago
Acceleration is the rate at which an object changes its velocity. It is typically represented by symbol a and measured in m/s2 (
Natalija [7]

Answer:

<u>Pseudocode:</u>

INPUT velocity

INPUT time

SET velocity = 0.44704 * velocity

SET acceleration = velocity / time

SET acceleration = round(acceleration, 1)

PRINT acceleration

<u>Code:</u>

velocity = float(input("Enter a velocity in miles per hour: "))

time = float(input("Enter a time in seconds: "))

velocity = 0.44704 * velocity

acceleration = velocity / time

acceleration = round(acceleration, 1)

print("The acceleration is {:.2f}".format(acceleration))

Explanation:

*The code is in Python.

Ask the user to enter the velocity and time

Convert the miles per hour to meters per second

Calculate the acceleration using the formula

Round the acceleration to one decimal using round() method

Print the acceleration with two decimal digits

7 0
2 years ago
Which is among the earliest formats of audio used in video games? A. MP3 B. wave table synthesis C. pulse code modulation D. MOD
solong [7]

Answer:

MOD

Explanation:

MOD audio file format is primarily used to represent music. It uses the .MOD file extension and has had popularity as background music for independent video games. It would be safe to say that MOD audio file extensions are the most widespread trackers that were used and are still being used in many computer games and demos.

0 0
1 year ago
Read 2 more answers
Suppose that cells B1 through B100 of an Excel spreadsheet contain the quantity of units ordered on each of 100 different days.
11111nata11111 [884]

Answer:

The "a" Option is correct.

Explanation:

The "COUNTIF" function counts every cell that, given a condition (value), suits into it. As you want to know the number of cells that contain a value of at least 50, the condition must be properly written to get the correct answer. Unless it is a cell value (e.g. B3), the condition must always be written with quotes (""). So, the options b and c are automatically discarded.

The d option appears to be correct, but it's not. If the condition is written ">50", the function will count every cell with a value above 50. But we're searching values at least (including) 50. So the correct answer is the a option.

7 0
2 years ago
Which Artificial Intelligence (AI) term is used to describe extracting information from unstructured text using algorithms?
Alla [95]

Answer:

The most basic and useful technique in NLP is extracting the entities in the text. It highlights the fundamental concepts and references in the text. Named entity recognition (NER) identifies entities such as people, locations, organizations, dates, etc. from the text.

5 0
2 years ago
Other questions:
  • Which statement best describes how the rapid prototyping model works?a) Developers create prototypes to show stakeholders how va
    11·2 answers
  • Which of the following would be a considered a want rather than a need for most people?
    15·1 answer
  • Write the definition of a function named quadratic that receives three double parameters a, b, c. If the value of a is 0 then th
    12·1 answer
  • Refer to the exhibit. Which two network addresses can be assigned to the network containing 10 hosts? Your answers should waste
    7·1 answer
  • Your company wants to conduct an exploratory study to gain new insights into some product changes you are considering. Which typ
    15·1 answer
  • Write a program that generates 1,000 random integers between 0 and 9 and displays the count for each number. (Hint: Use a list o
    12·1 answer
  • In Section 8.5.4, we described a situation in which we prevent deadlock by ensuring that all locks are acquired in a certain ord
    11·1 answer
  • Jim is writing a program to calculate the wages of workers in a teddy bear factory.
    7·1 answer
  • The fact that the speed of a vehicle is lower than the prescribed limits shall relieve the driver from the duty to decrease spee
    11·2 answers
  • What are ways to enter a formula in Excel? Check all that apply. Click on the Function Library group and select a function from
    10·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!