1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
aliina [53]
3 years ago
10

PYTHON1.)Assume that price is an integer variable whose value is the price (in US currency) in cents of an item. Write a stateme

nt 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".2.)Write a statement that reads a floating point value from standard input into temperature.3.)Write a statement that reads a word from standard input into firstWord.
Computers and Technology
1 answer:
hammer [34]3 years ago
3 0

Answer:

#part 1

#read the amount

amount=int(input("enter the amount:"))

#find the dollars

doll=int(amount/100)

// find the cents

cent=amount%100

#print output

print("{} dollars and {} cents.".format(doll,cent))

#part 2

#read a floating point

temperature=float(input("enter the temperature:"))

#part 3

#read a word

firstWord=input("enter a word:")

Explanation:

In part 1, read amount and the find the dollars with the help of "/" operator. Then find the cents with "%" operator and print both.In part 2, read a point and cast it to float then assign it to variable "temperature".In part 3,Read a word and assign it to variable "firstWord".

Output:

enter the amount:4321

43 dollars and 21 cents.

enter the temperature:12.5

enter a word:hello

You might be interested in
You are most likely to automatically encode information about
Orlov [11]

Answer:

You are most likely to automatically encode information about the sequence of your day's events.

5 0
3 years ago
Many say that computers are changing learning as radically as did printing in its age. how are computer technologies changing le
Iteru [2.4K]
Computers are broadening horizons of learning and cutting back on limitations. practically all the knowledge of the worls is only a few clicks away

7 0
3 years ago
External parts of a computer system and identify which are output and which are input devices.
Rasek [7]
What are the choices, that i could tell you are outputs and inputs, the common are: Outputs: Desktop-Monitor, Computer-Speakers, Computer-Printer.ETC... Inputs: Flash Drive-Computer, CD-Computer, Mouse-Computer, Keyboard-Computer, Power Supply-Computer.ETC...
6 0
3 years ago
Can somebody show me
OLEGan [10]
So you are gonna read that whole paragraph and then answer the question or describe what you learned about
7 0
3 years ago
Impact of computer in society, using relevant examples​
erica [24]
Computers have changed the way people relate to one another and their living environment, as well as how humans organize their work, their communities, and their time. Society, in turn, has influenced the development of computers through the needs people have for processing information.
3 0
3 years ago
Other questions:
  • Renee uses data from the Bureau of Labor Statistics to create a graph for a feasibility report. Which of the following should sh
    6·2 answers
  • Prompt the user ‘Enter a row vector of any numbers’ in the command window, and enter an arbitrary row vector and store it to x.
    6·1 answer
  • TVBCA has just occupied an old historic building in downtown Pittsburgh in which 15 employees will work.
    13·1 answer
  • after pouring concentrated disinfectant on larger drops or pools of blood how much contact time should be allowed before attempt
    8·2 answers
  • So I try to login into my origin account and this popped up.(photo). But everytime I try to type in something I’m unable to clic
    15·1 answer
  • Select four tasks associated with operating system maintenance. Cleaning inside the computer Defragmenting the hard drive Deleti
    11·1 answer
  • Help fast fast anyone
    10·1 answer
  • Can someone write this in java? Also, does anyone know how to do Edhesive assignments?
    15·1 answer
  • What are the functions of super computer?<br> ​
    7·2 answers
  • Please select the word from the list that best fits the definition<br><br> Plagiarism
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!