
上QQ阅读APP看书,第一时间看更新
A quick task for you
Q1. What kind of data does the input()
function return?
- Elements
- Decimals
- Strings
- Integers
Q2. What does the int()
function do?
- Changes data to whole numbers
- Changes data to a string
- Does nothing
- Changes a function into a different function
Q3. How is the float()
function different from the int()
function?
- They are not different, they do the same thing
- The
float()
function deals with strings only - The
float()
function converts data into floating point numbers only float()
converts words into numbers
Q4. If you make a function called addition()
in your Python shell, how do you run that addition function to test it?
- Type addition in your Python shell
- Type def addition in your Python shell
- Type
addition()
in your Python shell - Type
addition()
in your Python shell