Answer:
while True:
number = int(input("Enter a number: "))
product = number * 10
if product > 100:
break
print(str(product))
Explanation:
Create a while loop that iterates until a specific condition is created inside
Ask the user for the input
Multiply the input and put the result in product
Check if the product is greater than 100. If it is, stop the loop using break keyword
When the loop is done, print the product
Answer:
def isAnagram(s1, s2):
list1=s1
list2=s2
sortedlist1 = sorted(list1)
sortedlist2 = sorted(list2)
if sortedlist1 == sortedlist2:
print(list1+ " and "+list2+ " are anagram")
else:
print(list1+ " and "+list2+ " are not anagram")
Explanation:
Here is a call to the function isAnagram():
list1 =input("Enter String1 ")
list1 =input("Enter String2 ")
isAnagram(list1,list2)
Attached is the run and output for this program
Usually when you encounter the problem you see the error code number "0019" for an invalid bank account or routing transit numbers.
Accounting information is the subject to which this is categorized. As soon as the IRS or (Internal Revenue Service) suspects any error, it will deny the return immediately.
Answer:
The code solution is written in Java.
- import java.util.Scanner;
-
- public class TestScore {
-
- public static void main(String[] args) {
-
- Scanner input = new Scanner(System.in);
-
- System.out.print("Please enter first score: ");
- double firstScore = input.nextDouble();
- System.out.println("Grade: " + determineGrade(firstScore));
-
- System.out.print("Please enter second score: ");
- double secondScore = input.nextDouble();
- System.out.println("Grade: " + determineGrade(secondScore));
-
- System.out.print("Please enter third score: ");
- double thirdScore = input.nextDouble();
- System.out.println("Grade: " + determineGrade(thirdScore));
-
- System.out.print("Please enter fourth score: ");
- double fourthScore = input.nextDouble();
- System.out.println("Grade: " + determineGrade(fourthScore));
-
- System.out.print("Please enter fifth score: ");
- double fifthScore = input.nextDouble();
- System.out.println("Grade: " + determineGrade(fifthScore));
-
- System.out.println("Average score: " + calcAverage(firstScore, secondScore, thirdScore, fourthScore, fifthScore));
-
- }
-
- public static double calcAverage(double score1, double score2, double score3, double score4, double score5){
- double average = (score1 + score2 + score3 + score4 + score5) / 5;
- return average;
- }
-
- public static String determineGrade(double score){
- if(score >= 90){
- return "A";
- }
- else if(score >= 80 ){
- return "B";
- }
- else if(score >=70){
- return "C";
- }
- else if(score >=60){
- return "D";
- }
- else{
- return "F";
- }
- }
- }
Explanation:
Firstly, create the method, <em>calcAverage()</em>, that takes five test scores. Within the method, calculate the average and return it as output. (Line 33 - 36)
Next, create another method, <em>determineGrade()</em>, which takes only one score and return the grade based on the range of the score. (Line 38 -54)
Once the two required methods are created, we are ready to prompt use for input five test scores using Java Scanner class. To use get user input, create a Scanner object (Line 7). Next, use getDouble() method to get an input score and assign it to variables firstScore, secondScore, thirdScore, fourthScore & fifthScore, respectively. Once a score input by user, call determineGrade() method by passing the input score as argument and immediately print out the return grade. (Line 9 - 27)
At last, call calcAverage() method by passing the first test score variables as argument and print out the returned average value. (Line 29).
hyperlink
a hyperlink is what will let them click the link and go to it
please give branlest