Skip to content

This repository contains simple and commonly used Python commands such as print("Hello, World!"), for loops, while loops, and other beginner-friendly examples. It's mainly for my personal reference, but feel free to use it if you're learning Python too!

Notifications You must be signed in to change notification settings

Rabia2698/All-basic-python

Repository files navigation

What I learn in this repository

HelloWorld.py

In this file, I learned how to use the print() function in Python. It's used to display text (strings) or numbers stored in variables.

Example:
variable : greeting
string stored : Hello World
function used : print

forLoop.py

This file shows how to use for loops to repeat actions a specific number of times, often used to iterate through lists or ranges.

while_loop.py

Here, I practiced using while loops, which repeat a block of code as long as a certain condition is true.

function.py

I learned how to define and call functions in Python to organize and reuse blocks of code.

logic_ifelse_statement.py

This script demonstrates how to use if, elif, and else statements to make decisions based on conditions.

math.py

Basic math operations like addition, subtraction, multiplication, division, and using the math module are covered here.

try.py

This file introduces error handling using try and except blocks to prevent programs from crashing due to runtime errors.

append.py

In this script, I learned how to use the append() method to add items to a list.

create_table.py

This file shows how to create and display a simple table using lists and loops.

main.py

In this main file, I run a simple program Record Student Grade by using all the knowledge I learn.

About

This repository contains simple and commonly used Python commands such as print("Hello, World!"), for loops, while loops, and other beginner-friendly examples. It's mainly for my personal reference, but feel free to use it if you're learning Python too!

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages