Skip to content

Cubicl3s/python-prog-lang-task-1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

3 Commits
ย 
ย 

Repository files navigation


๐Ÿ Python Practice Questions for Beginners

This repository contains beginner-friendly Python practice questions covering essential programming fundamentals.


๐Ÿงฉ 1. Python Intro

Q1: Print "Hello, Python!"
Expected Output:


Hello, Python!

Q2: Display your name using the print() function.
Expected Output:

My name is Om

๐Ÿš€ 2. Python Get Started

Q3: Create a Python program that prints the result of 5 + 7.
Expected Output:


12

Q4: Write a simple Python program that prints โ€œIโ€™m learning Python!โ€.
Expected Output:


Iโ€™m learning Python!

๐Ÿ”ค 3. Python Syntax

Q5: Assign a value to a variable and print it.
Expected Output:

Python is awesome

Q6: Write a single-line statement to print the sum of 10 and 20.
Expected Output:

30

๐Ÿ’ฌ 4. Python Comments

Q7: Write a program with a single-line comment and print a message.
Expected Output:

This is a Python comment example

Q8: Write a program that uses a multi-line comment.
Expected Output:

Multi-line comment example


๐Ÿงฎ 5. Python Variables

Q9: Create a variable x with value 50 and print it.
Expected Output:

50

Q10: Assign your name to a variable and print: โ€œHello, โ€.
Expected Output:

Hello, Om

๐Ÿ”ข 6. Python Data Types

Q11: Print the type of the variable containing value 25.
Expected Output:

<class 'int'>

Q12: Create variables of different types and print their types.
Expected Output:

<class 'int'>
<class 'str'>
<class 'float'>
<class 'bool'>

๐Ÿ”ข 7. Python Numbers

Q13: Add two integers and print the result.
Expected Output:

15

Q14: Find the square of a number.
Expected Output:

49

๐Ÿ” 8. Python Casting

Q15: Convert the string โ€œ10โ€ into an integer and print it.
Expected Output:

10
<class 'int'>

Q16: Convert integer 5 into a float and print it.
Expected Output:

5.0
<class 'float'>

๐Ÿ”  9. Python Strings

Q17: Print your favorite quote inside double quotes.
Expected Output:

"Code is like humor. When you have to explain it, itโ€™s bad."

Q18: Print the length of the string "Python".
Expected Output:

6

โš–๏ธ 10. Python Booleans

Q19: Print the result of 10 > 5.
Expected Output:

True

Q20: Print the result of 7 == 9.
Expected Output:

False

โž— 11. Python Operators

Q21: Perform addition, subtraction, multiplication, and division on two numbers.
Expected Output:

15
5
50
2.0

Q22: Use the modulus operator to find the remainder when 10 is divided by 3.
Expected Output:

1

๐Ÿ“‹ 12. Python Lists

Q23: Create a list of 3 fruits and print it.
Expected Output:

['apple', 'banana', 'cherry']

Q24: Add a new fruit to the list and print it.
Expected Output:

['apple', 'banana', 'cherry', 'mango']

๐Ÿ”ข 13. Python Tuples

Q25: Create a tuple of colors and print it.
Expected Output:

('red', 'green', 'blue')

Q26: Access the first element of the tuple.
Expected Output:

red

๐Ÿงฐ 14. Python Sets

Q27: Create a set of unique numbers.
Expected Output:

{1, 2, 3, 4, 5}

Q28: Add a number to the set and print it.
Expected Output:

{1, 2, 3, 4, 5, 6}

๐Ÿ“š 15. Python Dictionaries

Q29: Create a dictionary with your name and age.
Expected Output:

{'name': 'Om', 'age': 20}

Q30: Access and print your age from the dictionary.
Expected Output:

20

๐Ÿ”€ 16. Python If...Else

Q31: Check if a number is positive or negative.
Expected Output:

Positive number

Q32: Write a program to check if a number is even or odd.
Expected Output:

Even number


โœ… End of Practice Set

This beginner-friendly set is perfect for hands-on Python fundamentals practice.
Happy Coding! ๐Ÿโœจ


About

"Day : Saturday | Date : 11 Oct, 2025"

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors