Write Python code that prompts the user to enter his or her height and assigns the user’s input to a variable named height.
Question 1: Write Python code that prompts the user to enter his or her height and assigns the user’s input to a variable named height.
Question 2: Write Python code that prompts the user to enter his or her favorite color and assigns the user’s input to a variable named color.
Question 3: Write assignment statements that perform the following operations with the variables a, b, and c:
Adds 2 to a and assigns the result to b
Multiplies b times 4 and assigns the result to a
Divides a by 3.14 and assigns the result to b
Subtracts 8 from b and assigns the result to a
Question 4: Assume the variables result, w, x, y, and z are all integers, and that w = 5, x = 4, y = 8, and z = 2. What value will be stored in result after each of the following statements execute?
result = x + y
result = z * 2
result = y / x
result = y – z
result = w // z
Question 5: Write a Python statement that assigns the sum of 10 and 14 to the variable total.
Question 6: Write a Python statement that subtracts the variable down_payment from the variable total and assigns the result to the variable due.
Question 7: Write a Python statement that multiplies the variable subtotal by 0.15 and assigns the result to the variable total.
Question 8: What would the following display?
a = 5
b = 2
c = 3
result = a + b * c
print(result)
Question 9: What would the following display?
num = 99
num = 5
print(num)
Question 10: Assume the variable sales references a float value. Write a statement that displays the value rounded to two decimal points.
Question 11: Assume the following statement has been executed:
number = 1234567.456
Write a Python statement that displays the value referenced by the number variable formatted as
1,234,567.5
Question 12: What will the following statement display?
print(‘George’, ‘John’, ‘Paul’, ‘Ringo’, sep=’@’)
Question 13: A customer in a store is purchasing five items. Write a program that asks for the price of each item, then displays the subtotal of the sale, the amount of sales tax, and the total. Assume the sales tax is 7 percent. Write the code here and attach a screenshot of the output using some sample data as an example.
Requirements: 13 questions
Collepals.com Plagiarism Free Papers
Are you looking for custom essay writing service or even dissertation writing services? Just request for our write my paper service, and we'll match you with the best essay writer in your subject! With an exceptional team of professional academic experts in a wide range of subjects, we can guarantee you an unrivaled quality of custom-written papers.
Get ZERO PLAGIARISM, HUMAN WRITTEN ESSAYS
Why Hire Collepals.com writers to do your paper?
Quality- We are experienced and have access to ample research materials.
We write plagiarism Free Content
Confidential- We never share or sell your personal information to third parties.
Support-Chat with us today! We are always waiting to answer all your questions.