Write and run a Python program that you store in a file. The program should demonstrate how to prompt the user for input and display the string the user entered.

What will be an ideal response?


$ cat mypy.py
#!/usr/bin/python
inp = raw_input('Enter the name of a month: ')
print 'You entered ' + inp
$ python mypy.py
Enter the name of a month: June
You entered June

or

$ chmod 755 mypy.py
$ ./mypy.py

Computer Science & Information Technology

You might also like to view...

a program to extract numbers from an input stream, compute their product, and display the result. Use the integer 0 as a sentinel.

What will be an ideal response?

Computer Science & Information Technology

If the desired Object is not found, binarySearch returns __________.

a. a positive value b. zero c. a negative value d. an ObjectNotFoundError.

Computer Science & Information Technology

A variable of a reference type contains:

a) information about the type and its data b) data of that type c) the address of the location in memory where data is stored d) None of the above.

Computer Science & Information Technology

In the Selection task pane, you can hide objects such as placeholders without deleting them

Indicate whether the statement is true or false

Computer Science & Information Technology