Question: 1. We will provide 2 strings to your program. Your job is to join the strings together so you get a single string with a

1. We will provide 2 strings to your program. Your job is to join the strings together so you get a single string with a space between the 2 original strings. This is a common case is coding and you will need to create your output by joining the inputs and adding the space in the middle.

# Input from the command line import sys string1 = sys.argv[1] string2 = sys.argv[2]

Expected Output: A B

2. We are providing a string as an input to your program.

Your job is to add the string , hello! to the string we provide you and then output it.

Make sure you include the space after the comma!

# Input from the command line

import sys

name = sys.argv[1]

Expected Output: 0, hello!

3. Your code should expect one input. All you need to do is add 12 to it and output the result.

import sys

N = int(sys.argv[1])

# digit1 = int(sys.argv[1])

Expected Output: 12 

4. Fix the broken code

Expected Output: 19.0 

# Input from the command line

 

import sys A = sys.argv[1] B = sys.argv[2] C = sys.argv[3]

# Your code goes here

# Outputs

5.

We pass in 2 strings, name1 and name2. You should output another string in the format

name1's done and name2's done  

with a new line between the two

and where name1 and name2 are replaced with the input string

# Input from the command line

import sys name1 = sys.argv[1] name2 = sys.argv[2]

Expected Output: 1's done and 2's done 

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!