Question: Create a different version of the program that: Takes a 3-digit number and generates a 6-digit number with the 3-digit number repeated, for example, 391

Create a different version of the program that:

  1. Takes a 3-digit number and generates a 6-digit number with the 3-digit number repeated, for example, 391 becomes 391391. The rule is to multiply the 3-digit number by 7*11*13.
  2. 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.

Times 11: A two-digit number can be easily multiplied by 11 in one's head simply by adding the digits and inserting that sum between the digits. For example, 43 * 11 has the resulting digits of 4, 4+3, and 3, yielding 473. If the sum between the digits is greater than 9, then the 1 is carried to the hundreds place. Complete the below program.

# Complete the following program

num_in_tens = int(input('Enter the tens digit: ')) num_in_ones = int(input('Enter the ones digit: '))

num_in = num_in_tens*10 + num_in_ones

print('You entered', num_in) print(num_in, '* 11 is', num_in*11)

num_out_hundreds = num_in_tens + ((num_in_tens + num_in_ones) // 10) #num_out_tens = ? FINISH #num_out_ones = ? FINISH

print('An easy mental way to find the answer is:') print(num_in_tens, ',', num_in_tens, '+', num_in_ones, ',', num_in_ones)

#Build num_out from its digits: #num_out = ? + ? + ? FINISH

# Note this line will generate an error until the above program is complete. print(num_out)

I'm supposed to complete the code, but I'm sure what to type. This code is in Python.

The inputs for the code are 5 & 8. I'm not sure if I have to change these.

Create a different version of the program that: Takes a 3-digit number

Load default template... 1 # Complete the following program 2 3 num_in_tens int(input("Enter the tens digit: ')) 4 num_in_ones int(input('Enter the ones digit: ')) 5 6 num_in num_in_tens 10 + num_in_ones 7 8 print('You entered', num_in) 9 print(num_in, "* 11 is', num_in 11) 10 11 num_out_hundreds = num_in_tens + ((num_in_tens + num_in_ones) // 10) 12 #num_out_tens = ? FINISH 13 #num_out_ones = ? FINISH 14 15 print("An easy mental way to find the answer is:') 16 print(num_in_tens, ',', num_in_tens, '+', num_in_ones,S,', num_in_ones) 17 18 #Build num_out from its digits: 19 #num_out = ? + ? + ? FINISH 20 21 # Note this line will generate an error until the above neogram is comlete 5 8 Run

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!