Skip to main content
Contents
Dark Mode Prev Up Next Scratch ActiveCode Profile
\(
\newcommand{\lt}{<}
\newcommand{\gt}{>}
\newcommand{\amp}{&}
\definecolor{fillinmathshade}{gray}{0.9}
\newcommand{\fillinmath}[1]{\mathchoice{\colorbox{fillinmathshade}{$\displaystyle \phantom{\,#1\,}$}}{\colorbox{fillinmathshade}{$\textstyle \phantom{\,#1\,}$}}{\colorbox{fillinmathshade}{$\scriptstyle \phantom{\,#1\,}$}}{\colorbox{fillinmathshade}{$\scriptscriptstyle\phantom{\,#1\,}$}}}
\)
Exercises 4.12 Drill and Practice
1.
Identify the problematic statements in this Python code.
Remember, proper formatting and syntax rules.
name = input(βEnter your name")
print("Nice to meet you,",name
2.
Identify the problematic statements in this Python code.
Remember, proper formatting and syntax rules.
first name = input("Enter your name")
print("Nice to meet you,", first_name)
3.
Identify the problematic statements in this Python code.
Remember, that the program will do what we tell it to do whether it is logical or not.
bill = float(input("Enter your bill amount"))
tax = float(input("Enter your tax percentage"))
tip = float(input("Enter your tip percentage"))
total = bill * tax * tip
print("your total amount is " + "$" + str(total))
4.
Identify the problematic statements in this Python code.
Remember, proper thinking about data types is important.
age = input("Enter your age")
future_age = age + 5
print(future_age)
You have attempted
of
activities on this page.