Computer Science, asked by aryanv2194, 11 months ago

Edhesive 3.5 code practice

Answers

Answered by Darkgirl52
4

Answer:

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:

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

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=10print(type(x))

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=10print(type(x))This will output: integer

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=10print(type(x))This will output: integerNow we can covert a string into integer as below:

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=10print(type(x))This will output: integerNow we can covert a string into integer as below:x=input("Enter X:")

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=10print(type(x))This will output: integerNow 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.

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=10print(type(x))This will output: integerNow 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:

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=10print(type(x))This will output: integerNow 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.

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=10print(type(x))This will output: integerNow 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

Answered by gabrielv2812
96

Answer:

grade= int(input('What Grade are you in?'))

if(grade == 9):

   print('Freshman')

   

elif(grade ==10):

   print('Sophomore')

elif(grade == 11):

   print('Junior')

   

elif(grade == 12):

   print('Senior')

   

else:

   print('Not in High School')

Explanation:

Have fun :)

Similar questions