Skip to content

sheddyranking/Python-for-Beginners-

Repository files navigation

Python for Beginners

This is my first python piece of code. the App.py is a folder for general python runtrue the calculate_age.py and cal_age_min.py are my first projects written defferently #caculate age: we converted the str(birth_year) to int so it can be substracted.

#Exercise 1: age had to be converted to a str because you can't concatinate a str to an int.

#Exercise2: the computer read the two imputs as str, we had to convert them to int and float, datatypes such as str(), int(), bool(), float(). have to proberly define for concatination.

#str_methods: how str methods/objects are used.

#added Arithmetic operator. #operator precedence #operator comparison. #logical operators

#added if statements.

#weight calculator: the weight was converted to and int so it can be devided by the float. also converted was a float, so we added str so it can be concatinated and print out. if the user types in 'k' the weight will be devide else any other word type it will multiply the weight.#added while-loop, also in python int can be multiplied to str.

#added list #added list methods.

#added for_loops #added the range_function #added tuples, the count() method return occurance of a value and index() method will returen the index of #that value in the Tuple.

About

An Introduction to Python for Beginners

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages