Part 2 | Python Programming | Working with Variables integers, strings, and floats

preview_player
Показать описание
This is part 2 of a series of python coding that I am having fun with and want to show others that are interested or stuck.

Code Example:
#variables and variable types
#Integers, Strings, and Floats

#Integers are used for whole numbers
iCount = int(10)

#floats are designed for numbers that are fractions of a whole number
fCount = float(2.5)

#Strings are used for anything that you want to display as a string. You might want to display a number as a string so you can turn an integer into a string using this function.
sName = str("Douglas")

print(iCount)
print(fCount)
print(sName)

Music: Paid subscription with Wondershare Filmora

#python #pythonprogramming #pythontutorial #pythonforbeginners #shorts
Рекомендации по теме
Комментарии
Автор

I'm very new to coding so if this is a stupid question please don't be too harsh! Let's say you have a variable that has multiple values inside. And I input a number and ask if that number is in that variable, output true, and if the number is not in the variable, output false. How would I write this? If this is even possible. If it's not possible, is there any other way to achieve something like this? Thank you for just reading this :)

HaydenHellis
welcome to shbcf.ru