In this task, you'll allow a user to input a string with two numbers (integers) to be multiplied together. For example: "Number1 * Number2" Your program will extract the two numbers and compute their result after multiplying them together. Your program should do the following: 1. Prompt the user to input a string with an integer the * character and then another integer 2. Extract the numbers from the string and convert them to integers 3. Multiple the two numbers together 4. Print the result as num1 * num2 = result (see below)

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter8: Arrays And Strings
Section: Chapter Questions
Problem 5PE
icon
Related questions
Question

How can i code this with python? 

Easy way pls  i didin't learn res thing

In this task, you'll allow a user to input a string with two numbers (integers) to be multiplied together.
For example: "Number1 * Number2"
Your program will extract the two
numbers and compute their result after multiplying them together.
Your program should do the following:
1. Prompt the user to input a string with an integer the * character and then another integer
2. Extract the numbers from the string and convert them to integers
3. Multiple the two numbers together
4. Print the result as num1 * num2 = result (see below)
----Task 4---- Multiple numbers
Input numbers to multiply:
300 * 15
Extracted numbers 300 15
300 * 15
4500
Transcribed Image Text:In this task, you'll allow a user to input a string with two numbers (integers) to be multiplied together. For example: "Number1 * Number2" Your program will extract the two numbers and compute their result after multiplying them together. Your program should do the following: 1. Prompt the user to input a string with an integer the * character and then another integer 2. Extract the numbers from the string and convert them to integers 3. Multiple the two numbers together 4. Print the result as num1 * num2 = result (see below) ----Task 4---- Multiple numbers Input numbers to multiply: 300 * 15 Extracted numbers 300 15 300 * 15 4500
Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning