Question

Type two statements. The first reads user input into person_name. The second reads user input into...

Type two statements. The first reads user input into person_name. The second reads user input into person_age. Below is a sample output for the given program if the user's input is: Amy 4

In 5 years Amy will be 9

This is in Python 3. A screenshot of the exact way it is written would be nice. Thank you.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Hi

Please check the following code If you want to take input in two different lines:

OUTPUT:

Please check the following code If you want to take input in one line:

OUTPUT:

Hope it helps

Please get back to me incase of any query. Give a thumbs up if you like the solution.

Have a great day :)

Add a comment
Know the answer?
Add Answer to:
Type two statements. The first reads user input into person_name. The second reads user input into...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Write a PYTHON program that reads a file (prompt user for the input file name) containing...

    Write a PYTHON program that reads a file (prompt user for the input file name) containing two columns of floating-point numbers (Use split). Print the average of each column. Use the following data forthe input file: 1   0.5 2   0.5 3   0.5 4   0.5 The output should be:    The averages are 2.50 and 0.5. a)   Your code with comments b)   A screenshot of the execution Version 3.7.2

  • Write a Python program that reads user input from the command-line. The program should define a...

    Write a Python program that reads user input from the command-line. The program should define a function read Position, which reads the values for t, v0, and h0. If there is an IndexError, print 'Please provide the values for t, vO, and hO on the command line.'. If t, v0, or h0 are less than 0. print 't = # is not possible.' for each variable respectively. Note that the # represents the number entered on the command-line by the...

  • Write a Java program (code + screenshot of output) that takes a user input temperature and...

    Write a Java program (code + screenshot of output) that takes a user input temperature and displays an output as follows: Temperature Output temperature > 40 Hot 40 ≥ temperature > 25 Warm 25 ≥ temperature > 15 Nice 15 ≥ temperature Cold Sample run1: Please input the temperature: 45 Hot Sample run2: Please input the temperature: 40 Warm Sample run3: Please input the temperature: 20 Nice Sample run4: Please input the temperature: 5 Cold Sample run5: Please input the...

  • PYTHON CODING Create a program that prompts the user twice. The first prompt should ask for...

    PYTHON CODING Create a program that prompts the user twice. The first prompt should ask for the user's most challenging course at Wilmington University. The second prompt should ask for the user's second most challenging course. The red boxes indicate the input from the user. Your program should respond with two copies of an enthusiastic comment about both courses. Be sure to include the input provided by the user to display the message. There are many ways to display a...

  • use Python and please comments every step. [25] 6. Write a program that reads from standard...

    use Python and please comments every step. [25] 6. Write a program that reads from standard input, two times in military format and prints the number of hours and minutes between the two times. Assume that the second time is always ahead of the first time. You should avoid using conditional statement (if-else) for this program. Your program must query the user for the two times and output the difference based on the two sample runs given below. Please enter...

  • 3. Write Python statements that will do the following: a) Input a string from the user....

    3. Write Python statements that will do the following: a) Input a string from the user. *** Print meaningful messages along with your output.* b) Print the length of the String. Example input: The sky is blue. Correct output: The length of the string is 16 Incorrect output: 16 c) Print the first character of the string. d) Print the last character of the string. 4. Save the program. Double-check the left edge for syntax errors or warning symbols before...

  • In C++ Sorted List of User Entered Numbers 2. Write a program that reads in a...

    In C++ Sorted List of User Entered Numbers 2. Write a program that reads in a list of integers into a vector with base type int. Provide the facility to read this vector from an input file. Make sure to ask the user for a filename. The output is a two-column list. The first column is a list of the distinct vector elements. The second column is the count of the number of occurrences for each element. The list should...

  • Complete the Python program below that performs the following operations. First prompt the user to input...

    Complete the Python program below that performs the following operations. First prompt the user to input two integers, n and m. If n<m, then print the odd positive integers that are less than m (in order, on a single line, separated by spaces). If man, then print the even positive integers that are less than n (in order, on a single line, separated by spaces). If neem, then print nothing. For instance, if the user enters 5 followed by 10,...

  • Python code Write a program that will ask the user to input two strings, assign the...

    Python code Write a program that will ask the user to input two strings, assign the strings to variables m and n If the first or second string is less than 10 characters, the program must output a warning message that the string is too short The program must join the strings m and n with the join function The output must be displayed. Please name the program and provide at least one code comment (10)

  • Write a Java program which allows the user to perform simple tasks on a calculator. A...

    Write a Java program which allows the user to perform simple tasks on a calculator. A series of methods allows the user to select an operation to perform and then enter operands. The first method displays a menu, giving the user the choice of typing in any one of the following: +, -, *, /, or % representing the usual arithmetic operators (Each operation should be done on numbers negative(-) to positive(+), positive(+) to negative(-), negative(-) to negative(-), and positive(+)...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT