The purpose of netiquette guidlelines is to provide a safe and secure environment for internet users everywhere
Answer:
customers = int(input("How many customers? "))
for i in range(customers):
name = input("Name of Customer " + str(i+1) + " ")
print("Oranges are $1.40 each.")
oranges = int(input("How many Oranges? "))
print("Apples are $.75 each.")
apples = int(input("How many Apples? "))
bill = oranges * 1.4 + apples * 0.75
print(name + ", you bought " + str(oranges) + " Orange(s) and " + str(apples) + " Apple(s). Your bill is $%.1f" % bill)
Explanation:
*The code is in Python.
Ask the user to enter the number of customers
Create a for loop that iterates for each customer. Inside the loop, ask the user to enter the name, number of oranges, number of apples. Calculate the bill. Print the name, number of oranges, number of apples bought and total bill
Answer:
Explanation:
The following code is written in Python. It is a function called guessMyNumber and like requested creates a random number and saves it to secretNumber. Then it continuously asks the user for their guess and compares it to the secret number. If the guess is correct it exits the loop otherwise it will continue to ask for a new guess.
import random
def guessMyNumber():
secretNumber = random.randint(1, 10)
print(secretNumber)
while True:
guess = input("Enter your guess: ")
guess = int(guess)
if (guess == secretNumber):
print("Congratulations you guessed correctly")
Answer:
If a method does not return a value, the return-value-type in the method declaration can be omitted.
Explanation:
If a method does not return a value, the return-value-type in the method declaration can be omitted is a false statement.
Answer:The answer is near field communication.
Explanation: