Answer:
Check the explanation
Explanation:
a) Consider the following SQL query to create a view TopLevelCust
Query: Create View TopLevelCust AS Select CustomerNum, CustomerName, Street, City, State, PostalCode, Balance, Creditlimit From Customer Where Creditlimit P= 10000,
- In order to create a view for TopLevelCust, it is required to replace viewname with TopLevelCust
- select Clause is used to retrieve stored records from the table o CustomerNum, CustomerName, Street, City, State, PostalCode, Balance and Creditlimit are the attribute name
- from clause specifies one or more table from where records. be retrieved o Customer is the table name
- where clause is used in SQL query to retrieve only those records that satisfy the specified condition
- CreditlLimit>=10000 is the specified condition to retrieve the information from table.
Answer:
name
Explanation:
name =
is an assignment to the variable called 'name'.
import random
rock,paper,scissors = 1,2,3
choice = int(input("Please choose 1 2 or 3: "))
computer = random.randint(1,3)
player_won = False
draw = False
if choice == computer:
draw = True
elif choice == 1 and computer == 3:
player_won = True
elif choice == 2 and computer == 1:
player_won = True
elif choice == 3 and computer == 2:
player_won = True
if player_won:
print("You won!")
elif not player_won and not draw:
print("The computer won!")
else:
print("It's a draw!")
First, I recommend importing at the beginning of your program. Also, you can combine all your same datatype variables in one line. You also need to cast your user choice to an integer so you can compare it with the computer's choice. I wrote the if, elif, and else statements using a boolean variable. I simply wrote all the possibilities that would result in the player winning and this would result in the player_won variable being true. If this is the case, we print to the console, "You won!"
Answer: Even though the hardware is inexpensive the writing of program is not efficient through this method as proper development of program is necessary for the clear execution due to factors like:-
- The facility of writing program even the cost of hardware is less but it is not a free facility.
- It also has a slower processing for the execution of the program
- The construction of the efficient program is necessary for the compilation and execution of it rather than poorly constructed program is worthless and inefficient in working.