subject

Python! ! these are supposed to be basic ones so not too crazy! using codelab to enter homework answers in.1. 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 variables name 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.2.assume that price is an integer variable whose value is the price (in us currency) in cents of an item. write a statement that prints the value of price in the form "x dollars and y cents" on a line by itself. so, if the value of price was 4321, your code would print "43 dollars and 21 cents". if the value was 501 it would print "5 dollars and 1 cents". if the value was 99 your code would print "0 dollars and 99 cents".3.write a statement that reads a word from standard input into firstword.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 01:30
Consider the following statements: #include #include class temporary { private: string description; double first; double second; public: temporary(string = "", double = 0.0, double = 0.0); void set(string, double, double); double manipulate(); void get(string& , double& , double& ); void setdescription(string); void setfirst(double); void setsecond(double); }; write the definition of the member function set() so that the instance variables are set according to the parameters. write the definition of the constructor so that it initializes the instance variables using the function set() write the definition of the member function manipulate() that returns a decimal number (double) as follows: if the value of description is "rectangle", it returns first * second if the value of description is "circle" it returns the area of a circle with radius first if the value of description is "cylinder" it returns the volume of a cylinder with radius first and height second. hint: the volume of a cylinder is simply the area of the circle at the base times the height. if the value of description is "sphere" it returns the volume of the sphere with radius first. otherwise it returns -1.0;
Answers: 1
question
Computers and Technology, 23.06.2019 10:30
How would you categorize the software that runs on mobile devices? break down these apps into at least three basic categories and give an example of each.
Answers: 1
question
Computers and Technology, 23.06.2019 11:30
In cell h5 enter a formula that will calculate the percentage of attendees that went to the altamonte springs job fair in 2018.
Answers: 1
question
Computers and Technology, 24.06.2019 00:50
3. what is the output of the following statements? temporary object1; temporary object2("rectangle", 8.5, 5); temporary object3("circle", 6, 0); temporary object4("cylinder", 6, 3.5); cout < < fixed < < showpoint < < setprecision(2); object1.print(); object2.print(); object3.print(); object4.print(); object1.set("sphere", 4.5, 0); object1.print();
Answers: 1
You know the right answer?
Python! ! these are supposed to be basic ones so not too crazy! using codelab to enter homework...
Questions