There are 12 teams in the tournament and every team will play
one match each on the knock-out basis in the first round. It means that the losing team of every match
leaves the tournament while the winning team continues to play the next match. From the twelve teams,
six winning teams will play another knock-out match. From these six teams, three winning teams will play
against each other on the round robin basis (i.e. team A plays against team B, team B plays against team
C, and team C plays against team A). The top two teams from this round will move to the final match. In
case all the teams win one match each at this stage, then there will be a toss to move one team to the
final while the other two teams will play against each other and the winner moves to the final.
For every match, you can generate a random number to declare the winner of the match. Similarly, you
can use a random number to simulate the toss. You are required to use if-else (if-else-if) structure to run
Run this code on python and takes a photo of the codes and the output: Show it to me
main_list = []
x = {}
field_names = [ "City name", "Area", "Population", "Annual Rainfall"]
list1 = [
["Adelaide", 1295, 1158259, 600.5],
["Brisbane", 5905, 1857594, 1146.4],
[ "Darwin", 112, 120900, 1714.7],
["Hobart", 135, 20556, 619.5],
["Sydney", 2058, 4336374, 1214.8],
["Melbourne", 1566, 3806092, 646.9],
["Perth", 5386, 1554769, 869.4]
]
for i in range(0, len(list1)):
for key in field_names:
#Below lines indented
for value in list1[i]:
x[key] = value
list1[i].remove(value)
break
main_list.append(x)
print(main_list)
Run this code and take a photos of code and the output on python
from prettytable import PrettyTable
table = PrettyTable()
table.field_names = ["pokemon name", "type"]
table.add_row(["pikachu", "Electric"])
table.add_row(["sydney", "Dark"])
table.add_row(["charmander", "Fire"])
table.add_row(["squite", "Water"])
print(table)
The manager of company has asked his assistant to present him with
the list the ages of all the workers working in manufacturing division
who are having the experience of 20 years. The assistant of thee
manager replied him with the list of 10 employees who are having the
experience of 20 years. Write a program that store the age of all 15
employees in 1D array and then print the total count of employees
whose age lies between 50 and 60. Use functions to solve this task
PLEASE SOLVE IT USING PYTHON
Input Format ->57 49 54 48 59 55 46 57 58 60 58 62 56 70 73
Constraints-> The Age of the employees should be greater than or equal to 40 and less than or equal to 60. If constraints do not match then show "wrong input"
Output Format - EXAMPLE 8 EMPLOYEES
Run this code and recheck the wrong, and show me the codes and the output
class AddColumn:
def add_column(str1,list1):
dict1[str1].append(list1)
x=AddColumn()
x.add_column( "City name",["Adelaide", "Brisbane", "Darwin", "Hobart", "Sydney", "Melbourne", "Perth"])
x.add_column("Area", [1295,5905, 112, 1357, 2058, 1566, 5386])
x.add_column("Population", [1158259, 18557594, 120900, 205556, 4336374, 3306092, 1554769])
x.add_column("Annual Rainfall"[600.5, 1146.4, 1714.7, 619.5, 1214.8, 646.9,869.4])
print(dict1)
22. Make a program that will input minutes and convert it into seconds. Your program will be terminated when you input zero in the minutes.
20. Make a program that will input seconds, convert it into minutes and hour. Display the equivalent minutes and hour/s . Your program will be terminated if you input zero in the hour.
Ex. Enter seconds: 120
Minutes = 2 (120 seconds/60)
Equivalent Hour is = 0.033 (120 seconds/ 3,600 seconds in 1 hour)
11. Make a program that will input hour, convert it into minutes and seconds. Display the minutes and seconds respectively. Your program will be terminated if you input zero in the hour.
Ex. Hour = 2
Minutes = 120
Seconds = 7200
12. Make a program that will input Sales, process the Value Added Tax deduction as follows:
Sales VAT
Less than equal =10000.00 10%
Above 10000.00 15 %
Display the taxable amount, Your program will be terminated if you input zero in the sales.
9. The Area of a Rectangle = L * W, where L=length and W=width. Make a program that will input Length and Width, compute and display the Area. Your program will be terminated to have an option to quit processing another entry.
Salary rate/year Tax Percentage deduction
Lesser than 500,000.00 10%
500,000.00 25%
501,000.00 and above 30%
Make a program that will input salary (for one year, Check the salary rate at what range it belongs, process the tax deduction and display the tax amount. Your program will be terminated when you input zero in the salary.
Ex. Salary: 450000.00
Tax deduction amount: 45000.00