Ask Question
7 December, 12:37

Edhesive 3.5 Code Practice in Python answer

+5
Answers (1)
  1. 7 December, 12:40
    0
    This chapter is about variables in Python. So a variable can be any data type. And to find the datatype of a variable we need to use below code:

    x=10

    print (type (x))

    This will output: integer

    Now we can covert a string into integer as below:

    x=input ("Enter X:")

    But above x is considered as string, and we need to convert it to integer to make use in for loop or any calculation.

    we can use:

    int (x), and this will convert x to int from string.

    Also, we have operators to change the variable values like =. + =, - =, / =, * = etc. So you need to remember these, and you will be up with all that is required for understanding variables. And rest is self explanatory certainly.

    Explanation:

    The answer is self explanatory.
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “Edhesive 3.5 Code Practice in Python answer ...” in 📗 Computers & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers