Answer:
Explanation:
The following program is written in Python. It creates two functions, one for writting the players and their scores to the file, and another function for reading the file and outputting whether or not they made Par. The functions can be called as many times that you want and the writeFile function allows for 16 inputs to be made when called. A test case has been provided with all of the players mentioned in the question. The output can be seen in the attached image below.
def writeFile():
file = open('output.txt', 'w')
for x in range(16):
firstName = input("Enter First Name:")
lastName = input("Enter Last Name:")
handicap = input("Handicap:")
score = input("Score:")
file.write(str(firstName) + " " + str(lastName) + " " + str(handicap) + " " + str(score) + "\n")
file.close()
def readFile():
file = open('output.txt', 'r')
for line in file:
lineArray = line.split(" ")
if int(lineArray[-1]) < 80:
print(str(lineArray[0]) + " " + str(lineArray[1]) + " Under Par" )
elif int(lineArray[-1]) == 80:
print(str(lineArray[0]) + " " + str(lineArray[1]) + " Made Par")
else:
print(str(lineArray[0]) + " " + str(lineArray[1]) + " Over Par")
file.close()
writeFile()
readFile()
Write a recursive function named is_decreasing that takes as its parameter a list of numbers. It should return True if the elements of the list are strictly decreasing (each element in the array is strictly less than the previous one), but return False otherwise.
Answer:
c
Explanation:
cho dãy số a[] có n phần tử và dãy số b[]cõ m phần tử là các các số nguyên dương nhỏ hơn 1000 . Gọi tập hợp A là tập các số khác nhau trong a[], tập hợp B là các số khác nhau trong b[]
Answer:
please translate
Thank you✌️
You are going to purchase (2) items from an online store.
If you spend $100 or more, you will get a 10% discount on your total purchase.
If you spend between $50 and $100, you will get a 5% discount on your total purchase.
If you spend less than $50, you will get no discount.
Givens:
Cost of First Item (in $)
Cost of Second Item (in $)
Result To Print Out:
"Your total purchase is $X." or "Your total purchase is $X, which includes your X% discount."
Answer:
Code:-
using System;
using System.Collections.Generic;
class MainClass {
public static void Main (string[] args) {
int Val1,Val2,total;
string input;
double overall;
Console.Write("Cost of First Item (in $)");
input = Console.ReadLine();
Val1 = Convert.ToInt32(input);
Console.Write("Cost of Second Item (in $)");
input = Console.ReadLine();
Val2 = Convert.ToInt32(input);
total=Val1+Val2;
if (total >= 100)
{
overall=.9*total;
Console.WriteLine("Your total purchase is $"+overall);
}
else if (total >= 50 & total < 100)
{
overall=.95*total;
Console.WriteLine("Your total purchase is $"+overall);
}
else
{
Console.WriteLine("Your total purchase is $"+total);
}
}
}
Output:
How to use the AI System ?
ANSWER:
· New artificial intelligence systems are being developed to help teachers administer more effective testing that could uncover some of these often-hidden conditions. Once they can be properly identified, educators can tap into the resources available for a learning disability. Students can use AI to give reliable feedback.
Fasilitas untuk pengaturan batas kertas pada Microsoft Word adalah….
a. Margin
b. View
c. LayOut
d. Paragraph
Office 92 sering disebut juga dengan….
a. Office 3.0
b. Office 7.0
c. Office Xp
d. Office 2.0
Fasilitas untuk pengaturan batas kertas pada Microsoft Word adalah
B.View
Office 92 sering disebut juga dengan
A.Office 3.0
Write a program that asks the user to enter in a username and then examines that username to make sure it complies with the rules above. Here's a sample running of the program - note that you want to keep prompting the user until they supply you with a valid username:
user_in = input ("Please enter your username: " )
if user_in in "0123456789":
print ("Username cannot contain numbers")
elif user_in in "?":
print ("Username cannot continue special character")
else:
print (" Welcome to your ghetto, {0}! ".format(user_in))