Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

PYTHON:1.Assume that message is a String variable. Write a statement to display its value on standard output. 2.Assume that word is a String variable. Write

PYTHON:1.Assume that message is a String variable. Write a statement to display its value on standard output.

2.Assume that word is a String variable. Write a statement to display the message "Today's Word-Of-The-Day is: " followed by the value of word on a line by itself on standard output.

3.Two variables, num and cost have been assigned values. Write a single statement that outputs num and cost to standard output. Print both values (num first, then cost), separated by a space on a single line that is terminated with a newline character. Do not output any thing else.

4. Write a single statement that will print the message "first is" followed by the value of first, and then a space, followed by "second = ", followed by the value of second. Print everything on one line and go to a new line after printing. Assume that the variables have already been given values. Instructor Notes: There should be a space between the string "first is" and the value of the first variable.

5.Write some code that reads in a name and an age into the variables name and age. It then prints the message "The age of NAME is AGE" on a line by itself, where NAME and AGE represent the values read into the variablesname and age respectively. For example, if your code read in "Rohit" and 70 then it would print out "The age of Rohit is 70" on a line by itself. There should NOT be a period in the output.Instructor Notes: The age needs to be an integer, not a string.

6.Write some code that reads a value representing a name into the variable name then prints the message "Greetings, NAME!!!" on a line by itself where NAME is replaced the value that was read into name. For example, if your code read in "Hassan" it would print out "Greetings, Hassan!!!" on a line by itself.

Instructor Notes: If you see a \ (backslash) in front of the exclamation marks, it shouldn't be there; some browsers seem to erroneously display it.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Relational Database Design With Microcomputer Applications

Authors: Glenn A. Jackson

1st Edition

0137718411, 978-0137718412

More Books

Students also viewed these Databases questions

Question

15. Identify the rescue from without in The Empire Strikes Back.

Answered: 1 week ago