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
kari74 [83]
2 years ago
12

LANGUAGE IS PYTHON!!! PLEASE HELP

Computers and Technology
1 answer:
aleksandr82 [10.1K]2 years ago
7 0

The required program written in python 3 is displayed below :

weight = eval(input())

<em>#prompts</em><em> </em><em>user</em><em> </em><em>to</em><em> </em><em>enter</em><em> </em><em>weight</em><em> </em><em>value</em><em> </em>

miles = eval(input())

<em>#prompts</em><em> </em><em>user</em><em> </em><em>to</em><em> </em><em>enter</em><em> </em><em>number</em><em> </em><em>of</em><em> </em><em>miles</em><em> </em>

if miles <= 500:

<em>#shipping</em><em> </em><em>calculation</em><em> </em><em>for</em><em> </em><em>miles</em><em> </em><em>value</em><em> </em><em>below</em><em> </em><em>500</em><em> </em><em>miles</em><em> </em>

if weight <=2 :

shipping_charge = 1.10

elif(weight>2)and(weight<=6):

shipping_charge = 2.20

elif(weight>6)and(weight<=10):

shipping_charge = 3.70

elif(weight>10):

shipping_charge=3.80

<em>#shipping</em><em> </em><em>charge</em><em> </em><em>for</em><em> </em><em>each</em><em> </em><em>weight</em><em> </em><em>category</em><em> </em>

else:

<em>#shipping</em><em> </em><em>cost</em><em> </em><em>if</em><em> </em><em>the</em><em> </em><em>miles</em><em> </em><em>value</em><em> </em><em>entered</em><em> </em><em>is</em><em> </em><em>above</em><em> </em><em>500</em><em> </em><em>miles</em><em> </em>

if weight <=2 :

shipping_charge = 1.10 * round(miles/500)

<em>#number</em><em> </em><em>of</em><em> </em><em>miles</em><em> </em><em>divided</em><em> </em><em>by</em><em> </em><em>500</em><em> </em><em>is</em><em> </em><em>rounded</em><em> </em><em>to</em><em> </em><em>the</em><em> </em><em>nearest</em><em> </em><em>whole</em><em> </em><em>number</em><em> </em><em>and</em><em> </em><em>multiplied</em><em> </em><em>by</em><em> </em><em>the</em><em> </em><em>500</em><em> </em><em>Mile</em><em> </em><em>charge</em><em> </em><em> </em><em> </em>

elif(weight>2)and(weight<=6):

shipping_charge = 2.20 * round(miles/500)

elif(weight>6)and(weight<=10):

shipping_charge = 3.70 * round(miles/500)

elif(weight>10):

shipping_charge=3.80 * round(miles/500)

print('Your total shipping charge is : $',shipping_charge)

<em>#</em><em> </em><em>displays</em><em> </em><em>the</em><em> </em><em>total</em><em> </em><em>shipping</em><em> </em><em>charge</em><em> </em><em>to be</em><em> </em><em>paid</em><em> </em><em>based</em><em> </em><em>on</em><em> </em><em>the</em><em> </em><em>inputted</em><em> </em><em>values</em><em>.</em><em> </em>

Learn more :brainly.com/question/25122309

You might be interested in
What does it mean to use too much jargon in a slide presentation?(computer applications)
marin [14]
B.using too much jargon means you are using words that may be unfamiliar to the audience. <span>is the answer. jargon is</span><span> difficult words that others might not understand.</span>
8 0
3 years ago
Read 2 more answers
What does the format painter button in excel do
wlad13 [49]
The format painter button in excel copies formatting from one place and it applies it to another
7 0
4 years ago
How many different bit strings are there of length 6 that contain the string 0000?
Elena L [17]

Answer:

It can be 100001, 100000,000001,000000

Hence, answer is 4.

its also can be found through 2C2 *2 = 2!/0! *2 =2*2 =4

Explanation:

The answer is straight forward, we have 2 empty places and we can select from 2 items, and hence its 2C2, and now we can arrange them as well, and since we can arrange in 2 ways, hence a total number of possibility = 2 * 2C2 = 4, which is the required answer.

5 0
3 years ago
Python Programming
Phoenix [80]

The python program that creates a Bankaccount class for a Bank ATM that is made up of the customers and has a deposit and withdrawal function is given below:

<h3>Python Code</h3>

# Python program to create Bankaccount class

# with both a deposit() and a withdraw() function

class Bank_Account:

def __init__(self):

 self.balance=0

 print("Hello!!! Welcome to the Deposit & Withdrawal Machine")

def deposit(self):

 amount=float(input("Enter amount to be Deposited: "))

 self.balance += amount

 print("\n Amount Deposited:",amount)

def withdraw(self):

 amount = float(input("Enter amount to be Withdrawn: "))

 if self.balance>=amount:

  self.balance-=amount

  print("\n You Withdrew:", amount)

 else:

  print("\n Insufficient balance ")

def display(self):

 print("\n Net Available Balance=",self.balance)

# Driver code

# creating an object of class

s = Bank_Account()

# Calling functions with that class object

deposit()

s.withdraw()

s.display()

Read more about python programming here:

brainly.com/question/26497128

#SPJ1

8 0
2 years ago
On a piano, a key has a frequency, say f0. Each higher key (black or white) has a frequency of f0 * rn, where n is the distance
lesantik [10]

Answer:

In C:

#include <stdio.h>

#include <math.h>

int main(){

   float f0,r,temp;

   r = pow(2.0,1.0/12);

   printf("f0: ");    scanf("%f", &f0);

   temp = f0;

   for(int i = 0; i<=4;i++){

       f0 = f0 * pow(r,i);

       printf("%.2lf ", f0);

       f0 = temp;    }

   return 0;

}

Explanation:

This declares f0, r and temp as float

   float f0,r,temp;

This initializes r to 2^(1/12)

   r = pow(2.0,1.0/12);

This prompts the user for f0

   printf("f0: ");    scanf("%f", &f0);

This saves f0 in temp

   temp = f0;

This iterates the number of keys from 0 to 4

   for(int i = 0; i<=4;i++){

This calculates each key

       f0 = f0 * pow(r,i);

This prints the key

       printf("%.2lf ", f0);

This gets the initial value of f0

       f0 = temp;    }

   return 0;

8 0
3 years ago
Other questions:
  • A touch screen is classified as a special type of scanning device true or false
    15·1 answer
  • 6. Which of the following is malware? (1 point)
    10·2 answers
  • 6. What is the difference between portrait and landscape orientation? What are the advantages of
    9·1 answer
  • Is technology uniting or isolating people
    14·2 answers
  • What third-party application serves as an alternative to OneNote?
    10·2 answers
  • ANSWER ALL QUESTIONS CORRECTLY PLEASE AND YOU WILL GET A BRAINLIEST AND 10+ POINTS!!!! I WOULD REALLY APPRECIATE IT
    14·1 answer
  • I am fast when im thin, I'm slow when im thick.<br><br>Air is my weakness,<br><br><br>What am I?
    13·1 answer
  • You are evaluating three branch prediction strategies: (1) predict always taken, (2) predict always not taken and (3) use the 2-
    14·1 answer
  • Contrast between functions of sort and sorted in python . ​
    10·1 answer
  • Implement one array of the English alphabet (26 characters). a) Create a function, getLetters() to cast and generate the array.
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!