Answer:
22,332
Explanation:
The taxable income :
Line 8 = Standard deduction or itemized deduction
Line 9 = Qualified business income deduction
Line 7 = Adjusted gross income
Taxable income = Adjusted gross income - (Qualified business income deduction + standard deduction)
Taxable income = 34732 - (12400 + 0)
Taxable income = 34732 - 12400
Taxable income = 22,332
Answer:
Question 1 :Write a program to enter a number and test if it is greater than 45.6 Example:
Answer:
#include <iostream>
using namespace std;
int main()
{
int user_number=0;
cout<<"Enter a number ";
cin >> user_number;
if(user_number >45.6){
cout <<"Greater than 45.6";
}
return 0;
}
Question 2: Test if a number grade is an A (greater than or equal to 90). If so print "Great!"
Answer:
#include <iostream>
using namespace std;
int main()
{
int user_number=0;
cout<<"Enter a number ";
cin >> user_number;
if(user_number >= 90){
cout <<"Great";
}
return 0;
}
Question 3:
Test if a password entered is correct. The secret phrase is Ada Lovelace.
Answer:
#include <iostream>
#include <string>
using namespace std;
int main()
{string pass_phrase ="Ada Lovelace";
string user_password="";
cout<<"Enter password ";
getline (cin, user_password);
if(user_password == pass_phrase){
cout <<"Correct";
}
else{
cout <<"Incorrect";
}
return 0;
}
Explanation:
Answer:
If you code a column list in an INSERT statement that includes a column that’s defined with a default value, you can insert the default value for that column by coding the DEFAULT keyword in the VALUES clause of the INSERT statement.
Explanation:
SQL permits insert the DEFAULT value on the columns when is required. Suppose the column has a NULL constraint(values on this column can not be set in null), then you can pass the default value.
For example:
INSERT INTO table(field1, field2, field3, field4) VALUES (10, DEFAULT, 20, DEFAULT)
Answer:
Written in Python:
fruit_dictionary = {}
fruit_dictionary = {'apple': 'red', 'orange': 'orange', 'banana': 'yellow'}
Explanation:
First (although, not necessary), we create an empty dictionary named fruit_dictionary on line 1
Next, we populate the dictionary using the following syntax:
{key-1:value-1, key-2:value-2,......,key-n:value-n}
In this case, the entry would be:
{'apple': 'red',
'orange': 'orange',
'banana': 'yellow'}
The items on the first column (i.e. apple, orange and banana) are the keys while the items on the second (i.e. red, orange and yellow) are the values of the dictionary
To print the items in the dictionary, you can add the following line of code:
<em>print(fruit_dictionary.items()) </em>