Skip to content

MyUstaadG

Learn to Serve

  • Computer Science
    • Software
    • Computer Tips
    • Coding
      • Conditional Structures Exercises
      • Loops Exercises
      • Arrays Exercises
      • Python Exercises
    • Microsoft Office
      • MS Excel
      • MS Word
  • Videos
    • Funny Videos
    • Health and Fitness Videos
    • PUBG Videos
    • Technology Videos
  • News
  • Funny
  • Memes
  • Playwright Tutorials
  • Tutorials
  • Toggle search form

A toy store is very successful in two of its products: clowns and dolls. Suppose, Each clown weighs 112 g and each doll 75 g. Write a program that reads the number of clowns and dolls sold in the last order and calculates the total weight of the package to be shipped | python Programming

Posted on March 13, 2022March 13, 2022 By myustaadg.com
Spread the love

Simple Data Types in Python

A toy store is very successful in two of its products: clowns and dolls. Suppose, Each clown weighs 112 g and each doll 75 g. Write a program that reads the number of clowns and dolls sold in the last order and calculates the total weight of the package to be shipped.

Solution:

clown_weighs = 112
doll_weighs = 75
clowns = int(input("Enter the number of clowns to send: "))
dolls = int(input("Enter the number of dolls to send: "))
total_weighs = clown_weighs * clowns + doll_weighs * dolls
print("The total weight of the package is " + str(total_weighs))

Step 1:

Enter number of clowns
Enter number of clowns

Step 2:

enter number of dolls
Enter number of dolls

Output:

final output
Output
Click Here For Direct Solution on Colab

#colab

#Python Programming Importance

Hope You will learn Something. Happy Coding.

Programming Exercises, Python Exercises Tags:colab, colab and python programming, easy python lectures, playwright python tutorial, programming in Python, python codding, python code on colab, python direct codes on colab, python exercises, python programming, Python programming exercises, Python programming lectures, python programming on colab, python pygments tutorial, simple data types in python, solved programming exercises in python, write a program that input number of clowns and dolls and calculate final shipping weighs in python, write a program to input number of crowns and dolls to calculate final shipping weighs

Post navigation

Previous Post: Write a program that input amount from user to invest, the annual interest and the number of years, and shows on the screen the capital obtained in the investment | Python Programming
Next Post: Write a program which input age from user and display on the screen if he/she is of legal age or not | Python Programming

More Related Articles

Write a program which input age from user and display on the screen if he/she is of legal age or not | Python Programming Programming Exercises
Write a program that displays the output of the following arithmetic operation on the screen (3+2/2⋅5)^2 | Python Programming Programming Exercises
Write a function, and a program to test it, that will place a zero in each element of array passed to it from the calling program. Arrays Exercises
Write a program that inputs values into an array. It multiplies the even values of elements with 5, odd values with 4 and adds the new values of an array. Arrays Exercises
Write a program that inserts a new value at a specified location into one-dimensional array of N elements. Arrays Exercises
Write a program that transposes a matrix A and displays the result on the screen | Transpose of a Matrix. Arrays Exercises

Copyright © 2022 MyUstaadG.

Powered by PressBook Blog WordPress theme