Skip to content

Rampravsh/Python

Repository files navigation

Python Basic Scripts

This repository contains a collection of basic Python scripts that demonstrate fundamental programming concepts. Each script is a standalone example that can be run and studied individually.

Files

Here is a list of the Python files in this project and a brief description of what they demonstrate:

  • variables.py: How to declare and use variables of different data types (string, integer, float, boolean).
  • typecasting.py: How to convert variables from one data type to another.
  • input.py: How to take input from the user.
  • operators.py: Different types of operators in Python (arithmetic, assignment, comparison, logical, identity, membership, and ternary).
  • ascii.py: How to get the ASCII value of a character and vice-versa.
  • ifelse.py: Conditional statements using if, elif, and else.
  • ternary.py: How to use the ternary operator for concise conditional expressions.
  • forloop.py: How to use for loops to iterate over a sequence.
  • whileloop.py: How to use while loops for repeated execution of a block of code.
  • calculator.py: A simple calculator that performs basic arithmetic operations based on user input.
  • pattern.py: How to print different patterns using nested loops.
  • app.py: A simple "Hello World" program.

How to Run

To run any of the scripts, navigate to the project directory in your terminal and use the python command followed by the script name. For example:

python forloop.py

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published