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
Who was the creator of the game Fnaf?
Lisa [10]
"Scott Cawthon" did that.........
8 0
3 years ago
Read 2 more answers
Question 4
Tcecarenko [31]

Answer: squared ← number * number

Explanation:

4 0
3 years ago
How do I write this code in java? input "Enter Your Age to Order a Beer"
Klio2033 [76]

Answer:

i dont know sorry but answer above lol

Explanation:

5 0
2 years ago
What is a way of telling the computer how to display certain content pls answer quick
coldgirl [10]
Machine language is the language understood by a computer. It is very difficult to understand, but it is the only thing that the computer can work with. All programs and programming languages eventually generate or run programs in machine language
4 0
2 years ago
Grade 10 python exercise
lbvjy [14]

number = 547

nums = {1:"one", 2:"two",3:"three",4:"four",5:"five",6:"six",7:"seven",8:"eight",9:"nine"}

print("The last digit of",number,"is",nums[number%10])

I wrote my code in python 3.8. I hope this helps.

7 0
3 years ago
Other questions:
  • Para saan po yung points dito?
    15·1 answer
  • ____, developed by xuejia lai and james massey, is a block cipher that operates on 64-bit blocks of plaintext.
    10·1 answer
  • Which of the following are examples of algorithms? (Select all that apply, if any do.)
    15·2 answers
  • 17) you need to locate an article that (1) is published by a university or proffessional association(2) is authored by clearly d
    6·1 answer
  • 2. What type of expansion card allows your computer to
    12·1 answer
  • How many dog breed are there
    9·2 answers
  • Ania has written this SimpleStopwatch class. In which line is she measuring the elapsed time?
    13·1 answer
  • Please help with question
    14·1 answer
  • With a(n) ____ you can arrive at a scene, acquire the data you need, and return to the lab as quickly as possible.
    14·1 answer
  • Which open-sourced packet capture tool uses linux and mac os x operating systems?
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!