The document outlines a Python task sheet with ten coding exercises. Tasks include printing a multiplication table, countdown, generating even numbers, calculating factorials, performing unit conversions, and implementing a simple ice-cream shop menu. Additionally, it includes a user authentication program with limited attempts for entering credentials.
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 ratings0% found this document useful (0 votes)
8 views1 page
Python Task Sheet 3
The document outlines a Python task sheet with ten coding exercises. Tasks include printing a multiplication table, countdown, generating even numbers, calculating factorials, performing unit conversions, and implementing a simple ice-cream shop menu. Additionally, it includes a user authentication program with limited attempts for entering credentials.
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 #3
1. Write a code to print the table of 8
2. Write a code to print the count down from 10 to 1. 3. Write a code to print “I am a Creator” for 10 times. 4. Write a code to generate even numbers in a range 100-500. 5. Write a code to find the addition of all the odd numbers in a range 1-100. 6. Write a code to find out the factorial of a number entered by the user. For e.g. user enters 6 then factorial of 6 is: 6*5*4*3*2*1 i.e 720. 7. Write a code which finds the square of any number entered by the user. Program should ask user whether he wish to continue, if user responds in ‘yes’ then program asks to enter number again and finds the square of it. If user doesn’t wish to continue then the program ends. 8. Write a program for unit converter. A menu of operations is displayed to the user as: a. Meter-Cm b. Kg-Grams c. Liter-Ml Ask the user to enter the choice about which conversion to be done. Ask user to enter the quantity to be converted and show the result after conversion. Ask user whether he wish to continue conversion or quit. Repeat the operations till the user wish to continue. 9. Write a code to display menu of Ice-Cream shop as: a. Butterscotch - Rs. 180 b. Vanila - Rs. 100 c. Mango – Rs. 150 d. Strawberry – Rs. 120 e. ChocoChips – Rs. 200 Ask user to enter the flavor to be bought and the quantity. Repeat till user wish to continue buying. Once user finishes buying order, generate the bill for the user. 10. Write a program to ask user to enter the Username and Password. If Username & Password entered by the user doesn’t match with already stored value, then user will get 2 more attempts to enter correct password. If the user is unable to enter the correct Username & Password even after 2 Attempts. Show the message to the user that User is blocked and End the program.