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

Python Practical - Practice Worksheet

The document outlines three Python programming tasks. The first task involves creating a multiplication table for a user-input number up to 12. The second task counts even numbers from five user-input numbers, and the third task implements a guessing game where the user must guess a fixed secret number, receiving feedback on their guesses until they succeed.

Uploaded by

kmzaidi
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)
3 views1 page

Python Practical - Practice Worksheet

The document outlines three Python programming tasks. The first task involves creating a multiplication table for a user-input number up to 12. The second task counts even numbers from five user-input numbers, and the third task implements a guessing game where the user must guess a fixed secret number, receiving feedback on their guesses until they succeed.

Uploaded by

kmzaidi
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

1.

Write a Python program to accept a number from the user and display the multiplication table of
that number up to 12.

2. Write a Python program that accepts 5 numbers from the user and counts the even numbers.

3. Write a program that does the following –


 Fix the secret number as 80.
 Ask the user to enter a number.
 Compare the user’s number with 80:
 If the number is greater than 80, display “Too high”.
 If the number is less than 80, display “Too low”.
 After every wrong guess, display “Guess again” and ask the user to enter a number again.
 When the user guesses 80 correctly, display “You guessed it” and stop the program.

You might also like