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
Complete the sentence.<br> Python is a_____<br> level language compared to bytecode.
Crazy boy [7]

Answer:

High

Explanation:

Python is high level; Bytecode is intermediate

5 0
3 years ago
Read 2 more answers
The * key on the number keypad is used for _____.
12345 [234]

Answer:

multiply

Explanation:

8 0
3 years ago
Read 2 more answers
What happens when text is added to grouped objects that is larger than an object ?
Elodia [21]

Answer:

You have to select the picture and pick the text at first.

Then press context menu key on a keyboard or right mouse button and choose group/ungroup point.

Choose group.

And finally you can select and resize the object and text simultaneously.

6 0
3 years ago
Read 2 more answers
Given that add, a function that expects two integer parameters and returns their sum, and given that two variables, euro_sales a
Evgesh-ka [11]

Answer:

int eurasia_sales = add(euro_sales,asia_sales);

Explanation:

Kindly find the explanation attached

Download txt
7 0
4 years ago
Join my among us <br><br> code GNLMJF
ryzh [129]

Answer:

i cant

Explanation:

i would but im on a chromebook rn

sorry but thanks

take care

8 0
3 years ago
Read 2 more answers
Other questions:
  • Which data type uses more memory an integer or an unsigned integer?
    6·1 answer
  • A(n) __________ program translates a high-level language program into a separate machine language program.
    8·1 answer
  • Which of the following is a valid format symbol in Microsoft Excel? Dollar Sign, Comma, Percent Sign or all of them? I can't fig
    14·1 answer
  • A(n) ____ network uses a central cable to which all network devices connect.
    13·1 answer
  • Data means a group of numbers. <br> a. True<br> b. False
    7·1 answer
  • What is an example of a condition controlled loop? What would the syntax look like?
    14·1 answer
  • 16^2-8xy+y^2-25(x-y)^2
    13·1 answer
  • 13. A 2-sided coin has an equal likelihood of landing on each side. One side is called "heads" and the other is called "tails".
    11·1 answer
  • What is the difference between Input, Output, and Storage Devices?
    12·2 answers
  • 8. Suppose you've created a bulleted list, but the bullets are too close to the text. What is the best way to fix this?
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!