Answer:
Following are the program in the Python Programming Language.
import json #import package
#define function
def read_json(info):
return json.loads(info)#load data in variable
#call and print the function
print(read_json('[{'A': 10}, {'Y': 16}, {'U': 28}]'))
Output:
[{'A': 10}, {'Y': 16}, {'U': 28}]
Explanation:
following are the description of the code
Prepared statements
b
Cursors
c
Connections
d
Queries
Answer: (A) Prepared statement
Explanation:
Prepared statement is basically used in the structured query language (SQL) statement which are basically execute multiple times in the python script.
The prepared statement is typically used in the SQL statement for update and queries. It is used to executed for the similar SQL statement and it has high efficiency.
It basically is in the form of template where the database compile and perform various query optimization.
Answer:
vowels = ("a", "e", "i", "o", "u")
word = input("Enter a word: ")
is_all = True
for c in vowels:
if c not in word:
is_all = False
if is_all == True:
print(word + " is a vowel word.")
else:
print(word + " is not a vowel word.")
Explanation:
Initialize a tuple, vowels, containing every vowel
Ask the user to enter a word
Initially, set the is_all as True. This will be used to check, if every vowel is in word or not.
Create a for loop that iterates through the vowels. Inside the loop, check if each vowel is in the word or not. If one of the vowel is not in the vowels, set the is_all as False.
When the loop is done, check the is_all. If it is True, the word is a vowel word. Otherwise, it is not a vowel word.
o True
o False
Answer:
False
Explanation:
The answer is False. In Stacks, we can access only the top element present in the stack. Stack is the collection of elements which follow LIFO ( Last In First Out ) which means the last element inserted in the stack is the first element to out. Stack has restriction that only the element which is present at the top called as top element is only accessible. That means only the top element can be inserted and deleted.
Answer:
Explanation:
In real-world environments, once the domains that are affected by the risks are identified, subsequent next steps would include selecting, implementing, and testing controls to minimize or eliminate those risks.
Answer:
bill = 47.28
tip = bill * 0.15
total_pay = bill + tip
each_share = total_pay / 2
print("Each person needs to pay: " + str(each_share))
Explanation:
*The code is in Python.
Set the bill
Calculate the tip, multiply the bill by 0.15
Calculate the total_pay, add bill and tip
Calculate each friend's share, divide the total_pay by 2. Then, print it in required format.
Answer:
Sample output:
Enter integer 3232423
true
Enter integer 12131231
false
Explanation:
Above is the output of the program and for the solution check the screenshots attach to understand clearly the program.
Thanks