Skip to content

Vivekdash123/Python-Example-on-Typecasting-between-String-Float-and-Integer-variables

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

basic Python project that demonstrates typecasting. We'll create a simple program that allows the user to input different types of data, and the program will typecast those inputs to various other types (like int, float, and str).

How this project works: User Input: The program asks the user to enter a string, an integer, and a floating-point number. Typecasting Operations: The string is typecast to an integer. The integer is typecast to a float. The float is typecast to an integer (decimal part will be discarded). The integer and float are typecast to strings. Error Handling: If the user inputs something that cannot be cast to an integer (like non-numeric text), it will handle the exception and inform the user.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published