Robotics & Artificial Intelligence
Name the following constants as defined in Python:
| Constants | Name of the constant |
|---|---|
| 0.00345 | |
| 'A' | |
| True | |
| -999 |
Python Funda
1 Like
Answer
| Constants | Name of the constant |
|---|---|
| 0.00345 | Floating Point Constant |
| 'A' | String Constant |
| True | Boolean Constant |
| -999 | Integer Constant |
Answered By
3 Likes
Related Questions
Boolean data is used to test a particular condition i.e., True or False.
Which of the following is the correct representation?
- boolean m=True
- boolean m='True'
- boolean m="True"
- none of them
State whether the following statements are True or False:
- Comments are executable statements.
- The import statements are used to include modules or libraries into the program to accomplish tasks.
- Operators are the symbols or tokens to perform various mathematical or logical operations on data.
- All whole numbers (positive or negative numbers) without a decimal point are said to be float type numbers.
- The tuple is an ordered set of elements containing one or more data items of the same or different types.
- In Python, we cannot assign the same integer value to different variables.
- Python is case sensitive and thus it treats uppercase and lowercase letters differently.
- Boolean constants are special literals and represent only two Boolean values.
Predict the output and type of casting for the given Python expressions:
Python Expression Explicit/Implicit m = 32.005, n = 45
print(int(m+n))a = 42.85, b = 12.45
print(a+b)Predict the output when executed:
Given: list1 = ['Robotics', 2026, 'ICSE', 'Edition']
Statement Output print(list1) print(list1[0]) print(list1[1:3]) print(list1[2:])