Skip to content

nicokuehn-dci/learnpythonfundamentals

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

Features

Built-in Data Types: Demonstrates integer, float, boolean, and NoneType.

Strings and Characters: Shows string declaration and single character handling.

Comparison Operators: Compares two user-input numbers.

Variable Naming Conventions: Illustrates different naming styles in Python.

String Methods: Demonstrates various string manipulation techniques.

Conditional Statements: Uses if-elif-else to assign letter grades based on numerical scores.

How to Use

Ensure you have Python 3.x installed on your system.

Download the script and save it as python_concepts_demo.py.

Open a terminal or command prompt.

Navigate to the directory containing the script.

Run the script using the command: python python_concepts_demo.py

Follow the on-screen menu to explore different Python concepts.

Menu Options

Compare Numbers: Enter two numbers to see how comparison operators work.

Show Variable Names: Displays examples of Python naming conventions.

String Operations: Enter a string to see various string methods in action.

Grade Score: Enter a numerical score to see how conditional statements assign letter grades.

Exit: Terminate the program.

Code Structure

The script is organized into separate functions for each concept.

A main menu function (menu()) provides an interactive interface.

The if __name__ == "__main__": block ensures the menu runs only when the script is executed directly.

Learning Objectives

Understanding basic Python data types

Working with strings and their methods

Using comparison operators and conditional statements

Following Python naming conventions

Creating and using functions

This script is ideal for Python beginners to experiment with core concepts in an interactive manner. Feel free to modify and expand upon it for your learning needs!

About

a short code for learning python fundamentals. Input - Output ....

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages