You first need to figure out what kind of game you would like to create. Find codes and certain websites that will help you set up and or make a game.
Answer:
product_name = input("Enter product name : ")
if product_name=="pen"or"book"or"box"or"pencil"or"eraser":
if product_name == "pen":
amount = 10
print(f"Product Name: {product_name}\nCost: {amount} rupees")
if product_name == "book":
amount = 100
print(f"Product Name: {product_name}\nCost: {amount} rupees")
if product_name == "box":
amount = 150
print(f"Product Name: {product_name}\nCost: {amount} rupees")
if product_name == "pencil":
amount = 5
print(f"Product Name: {product_name}\nCost: {amount} rupees")
if product_name == "eraser":
amount = 8
print(f"Product Name: {product_name}\nCost: {amount} rupees")
else:
print("Item not found!")
Explanation:
The python program is a code of nested if-statements that compares the input string to five items of the first if-statement. For every item found, its code block is executed.
Answer:
binary,decimal, hexadecimal and octal number system
Answer:
The Statement for selecting values from the table in SQL is given below,
SELECT vendor_name, vendor_contact_last_name, vendor_contact_first_name FROM Vendors;
Explanation:
SQL stands for Structured query language which is used to insert, update, delete and modify the value in a table.
There are five types of SQL-
1. Data definition language
2. Data manipulation language
3. Data control language
4. Transaction Control Language
5. Data Query Language
The SELECT statement comes under DDL which is used to select and display values from a table.
We can use select statement in two ways-
1. SELECT column_name1, column_name2 ........column_nameN FROM Table_name;
2. SELECT * FROM tablename; ( This is used to select all values from the table name)
We can also give conditions using WHERE clause while selecting values.