0% found this document useful (0 votes)
4 views1 page

Python Task Sheet #2

The document outlines a Python task sheet with ten coding exercises. These tasks include converting pounds to kilograms, generating auto replies based on user input, finding the smallest number between two inputs, calculating and comparing the areas of triangles, displaying information about food grains, checking values against a mathematical equation, identifying chemical names from symbols, generating words based on an alphabet, creating a shopping bill, and developing a quiz game with user interaction. Each task is designed to enhance programming skills through practical applications.

Uploaded by

nkstudy69
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views1 page

Python Task Sheet #2

The document outlines a Python task sheet with ten coding exercises. These tasks include converting pounds to kilograms, generating auto replies based on user input, finding the smallest number between two inputs, calculating and comparing the areas of triangles, displaying information about food grains, checking values against a mathematical equation, identifying chemical names from symbols, generating words based on an alphabet, creating a shopping bill, and developing a quiz game with user interaction. Each task is designed to enhance programming skills through practical applications.

Uploaded by

nkstudy69
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Python Task Sheet #2

1. Write a code to convert the quantity entered by the user in pounds to Kg.

2. Write a code which generates Auto Replies according to the answer by the user:
The code will ask the questions and ask user to answer the question. And code will
generate the reply for the answer. The Queries and the relies are:
Query 1: What is your name?
Reply: Hello _name_by_user !! Welcome!!
Query 2: You are from which School?
Reply: _school_nam_by_user is a renowned school in the city.
Query 3: What is your Hobby?
Reply: _Hobby_name_by_user is an unique hobby.

3. Write a code to find the smallest number between the two numbers entered by
the user.

4. Write a code to calculate Area of two triangles. And compare these areas, and
print which triangle has the greater Area. Note.: Take input from the user as Base
and Height values for two triangles.

5. Write a code which takes the names of the food grains for e.g. Rice, Wheat,
Blackgram etc. and display information about that foodgrain.

6. Write a code which takes the values of x & y for the equation : 2*x + 3*y =18. As
the user enters the values of x and y , code checks whether the values satisfies the
equation or not.

7. Write a code which takes as a input chemical symbol and displays its chemical
name. For e.g. if the input is ‘cl’ the code will display, “Chlorine is the chemical name
for symbol cl”

8. Write a code which takes input as alphabet and displays 5 words for that alphabet.

9. Write a code which displays the 5 shopping items and their prices. Take the user
input of
a) Item to be bought
b) Quantity to be bought
Generate the bill according to the quantity of particular Item bought.

10. Write a code for the Quiz game. Ask user 3 questions with 2 Answer options.
Check the answers given by the user and update the score, also give feedback to the
user if the answer is correct or not.

You might also like