0% found this document useful (0 votes)
18 views2 pages

Python Practice Problems Beginner

The document contains a series of Python practice problems designed for beginners, focusing on variables, data types, operators, and control flow. It includes tasks such as creating a simple interest calculator, checking if a number is odd or even, and determining if a year is a leap year. Each problem encourages users to apply fundamental programming concepts in Python.

Uploaded by

artinauhwar318
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)
18 views2 pages

Python Practice Problems Beginner

The document contains a series of Python practice problems designed for beginners, focusing on variables, data types, operators, and control flow. It includes tasks such as creating a simple interest calculator, checking if a number is odd or even, and determining if a year is a leap year. Each problem encourages users to apply fundamental programming concepts in Python.

Uploaded by

artinauhwar318
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/ 2

Python Practice Problems for Beginners

Topics: Variables, Data Types, Operators, Control Flow

1. Variables, Data Types, and Basic I/O

1. Input and Print:

Ask the user for their name and age, then print a greeting: 'Hello John, you are 25 years old.'

2. Temperature Converter:

Input temperature in Celsius, convert it to Fahrenheit (F = C × 9/5 + 32).

3. Simple Interest Calculator:

Input principal, rate, and time. Calculate simple interest (SI = (P × R × T) / 100).

4. Swapping Variables:

Swap two numbers entered by the user (without using a third variable).

5. Data Type Identifier:

Input a value from the user and print its type.

2. Operators and Expressions (Including Arithmetic)

1. Basic Calculator:

Take two numbers and an operator (+, -, *, /, %) and perform the operation.

2. Area and Perimeter of a Rectangle:

Input length and width, output area and perimeter.

3. Odd or Even Checker:

Input a number and determine whether it is odd or even.

4. Modulus Puzzle:

Given a number, print the last digit using the % operator.


Python Practice Problems for Beginners
Topics: Variables, Data Types, Operators, Control Flow

5. Compound Interest Calculator:

Input principal, rate, and time. Output compound interest (CI = P * (1 + R/100)^T - P).

3. Control Flow (if, elif, else)

1. Positive, Negative, or Zero:

Input a number and check if it's positive, negative, or zero.

2. Largest of Three Numbers:

Input three numbers, print the largest one.

3. Grading System:

Input a mark (0-100), output the grade (A-F).

4. Leap Year Checker:

Input a year and determine if it's a leap year.

5. Vowel or Consonant:

Input a character, check whether it's a vowel or consonant.

You might also like