CMN 152V QUESTIONS AND ANSWERS
Can you add spaces between terms in code with really changing the meaning -
Answers -yes
How do u write pi - Answers -math.pi
How do you write e - Answers -math.e
How do u have access to a module's functionality (ex. Math) - Answers -import it
Aka; import math
If you dont write print you will only see what when you run code - Answers -the last
output in the block
How to print something - Answers -print( )
How to write a variable - Answers -x = 6
Can an _ start a variable - Answers -yes _x is a valid variable
Can some names not be variables - Answers -yes, thinks like math and other variables
that have other meanings in python
How to find what type something is - Answers -type ( )
What type is just: 1 - Answers -intiger
Int
What type is: 1.0 - Answers -float
What type is 3 + 5.0 - Answers -float
What is something put in ' ' - Answers -string
Str
What is boolean - Answers -bool
What is not False - Answers -true
What is not not False - Answers -false
How do you find string length - Answers -len ( )
To print do print ( len ( ) )
Can you add spaces between terms in code with really changing the meaning -
Answers -yes
How do u write pi - Answers -math.pi
How do you write e - Answers -math.e
How do u have access to a module's functionality (ex. Math) - Answers -import it
Aka; import math
If you dont write print you will only see what when you run code - Answers -the last
output in the block
How to print something - Answers -print( )
How to write a variable - Answers -x = 6
Can an _ start a variable - Answers -yes _x is a valid variable
Can some names not be variables - Answers -yes, thinks like math and other variables
that have other meanings in python
How to find what type something is - Answers -type ( )
What type is just: 1 - Answers -intiger
Int
What type is: 1.0 - Answers -float
What type is 3 + 5.0 - Answers -float
What is something put in ' ' - Answers -string
Str
What is boolean - Answers -bool
What is not False - Answers -true
What is not not False - Answers -false
How do you find string length - Answers -len ( )
To print do print ( len ( ) )