function. decide what the name of the function of each should be, how many parameters are required and what value needs to be returned. You're no longer required to solve the problem - try to re-manage your code to be a function. Write a program that gets 2 string variables and 2 integer variables from the user, concatenates (joins them together with no space) and displays the strings, then multiplies the two numbers on a new line and displays them with two decimal points. n1 = int (input ("Enter a number:")) n2 = int (input
function. decide what the name of the function of each should be, how many parameters are required and what value needs to be returned. You're no longer required to solve the problem - try to re-manage your code to be a function. Write a program that gets 2 string variables and 2 integer variables from the user, concatenates (joins them together with no space) and displays the strings, then multiplies the two numbers on a new line and displays them with two decimal points. n1 = int (input ("Enter a number:")) n2 = int (input
Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
Related questions
Question
Change this question to work
using a function. decide what the name of the
function of each should be, how many parameters
are required and what value needs to be returned.
You're no longer required to solve the problem - try
to re-manage your code to be a function.
Write a program that gets 2 string variables and 2 integer variables from the user, concatenates (joins them together with no space) and displays
the strings, then multiplies the two numbers on a new line and displays them with two decimal points.
n1 = int (input ("Enter a number:"))
n2 = int (input ("Enter another number:"))
s1 = input ("Enter a string")
s2 = input ("Enter another string")
print ("Concatenated string: %s, multiplied number %.2f"%(s1+s2, n1*n2))
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 4 steps with 1 images
Recommended textbooks for you
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education