PYTHON DATACAMP | EXAM PRACTICE
QUESTIONS AND CORRECT ANSWERS (100%
CORRECT VERIFIED ANSWERS) 2024/2025
What is this saying: 18%7 - ✔✔18 with a remainder of 7 (this is similar to mod in VBA)
Can you save values while coding? - ✔✔Yes
How to save values while coding? - ✔✔By defining a variable with a specific, case
sensitive name
Can you call a value by its name? - ✔✔Yes. For example, if you put "height = 2 ft",
anytime you type "height", python will read it as 2 feet
Can you use declared variables in calculations? - ✔✔yes (example: if you're seeing
how much weight hank has lost in the last 2 years, you could type weight2020 -
weight2018)
Do numbers have a type? - ✔✔Yes
What are the different types? - ✔✔- Float
- Integer (INT)
- Strings (STR)
- Boolean (BOOL)
,What is float? - ✔✔Python's way of representing a real number (an integer and a
fractional part)
What is INT? - ✔✔Integer - a type - real numbers
What is STR? - ✔✔Strings - a type - text
What is BOOL? - ✔✔Boolean - a type - true/false
What type is this an example of? Ex: z = true. Type(z) - ✔✔bool
Does the math change with each type? - ✔✔Yes: example:
1 + 2 = 3 (int)
ha + nk = hank (str)
Does the = sign mean equality? - ✔✔No, it means assignment
What is a # used for? - ✔✔A comment
What is this doing?
#Addition
Print(7+10) - ✔✔Above the print(7+10), add the comment: #Addition
, This is adding a comment (#addition) above Print(7+10) (which will be 17)
How to write this?
Above the Print(7+10), add the comment: #Addition - ✔✔#Addition
print(7+10)
What is this saying?
Print(100*1.1**7) - ✔✔This will first take the exponentiation of 1.1^7 and then
multiple that by 100 (pemdas)
What will be the answer to this?
Suppose you have $100 which you can invest with a 10% return each year. After one
year, it's 100*1.1 and after two years, it's 100*1.1*1.1. Add code to calculate how much
money you end up with after 7 years and print the result - ✔✔print(100*1.1**7)
Can you refer to a variable by a name? - ✔✔Yes
What symbol do you use to create a variable? - ✔✔=
What is this doing?
Savings = 100
Print(Savings) - ✔✔Create a variable savings with the value 100
QUESTIONS AND CORRECT ANSWERS (100%
CORRECT VERIFIED ANSWERS) 2024/2025
What is this saying: 18%7 - ✔✔18 with a remainder of 7 (this is similar to mod in VBA)
Can you save values while coding? - ✔✔Yes
How to save values while coding? - ✔✔By defining a variable with a specific, case
sensitive name
Can you call a value by its name? - ✔✔Yes. For example, if you put "height = 2 ft",
anytime you type "height", python will read it as 2 feet
Can you use declared variables in calculations? - ✔✔yes (example: if you're seeing
how much weight hank has lost in the last 2 years, you could type weight2020 -
weight2018)
Do numbers have a type? - ✔✔Yes
What are the different types? - ✔✔- Float
- Integer (INT)
- Strings (STR)
- Boolean (BOOL)
,What is float? - ✔✔Python's way of representing a real number (an integer and a
fractional part)
What is INT? - ✔✔Integer - a type - real numbers
What is STR? - ✔✔Strings - a type - text
What is BOOL? - ✔✔Boolean - a type - true/false
What type is this an example of? Ex: z = true. Type(z) - ✔✔bool
Does the math change with each type? - ✔✔Yes: example:
1 + 2 = 3 (int)
ha + nk = hank (str)
Does the = sign mean equality? - ✔✔No, it means assignment
What is a # used for? - ✔✔A comment
What is this doing?
#Addition
Print(7+10) - ✔✔Above the print(7+10), add the comment: #Addition
, This is adding a comment (#addition) above Print(7+10) (which will be 17)
How to write this?
Above the Print(7+10), add the comment: #Addition - ✔✔#Addition
print(7+10)
What is this saying?
Print(100*1.1**7) - ✔✔This will first take the exponentiation of 1.1^7 and then
multiple that by 100 (pemdas)
What will be the answer to this?
Suppose you have $100 which you can invest with a 10% return each year. After one
year, it's 100*1.1 and after two years, it's 100*1.1*1.1. Add code to calculate how much
money you end up with after 7 years and print the result - ✔✔print(100*1.1**7)
Can you refer to a variable by a name? - ✔✔Yes
What symbol do you use to create a variable? - ✔✔=
What is this doing?
Savings = 100
Print(Savings) - ✔✔Create a variable savings with the value 100