1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
scZoUnD [109]
3 years ago
5

Output values below an amount

Computers and Technology
1 answer:
elena-s [515]3 years ago
5 0

Answer:

def output_ints_less_than_or_equal_to_threshold(user_values, upper_threshold):

  for value in user_values:

      if value < upper_threshold:

          print(value)  

def get_user_values():

  n = int(input())

  lst = []

  for i in range(n):

      lst.append(int(input()))

  return lst  

if __name__ == '__main__':

  userValues = get_user_values()

  upperThreshold = int(input())

  output_ints_less_than_or_equal_to_threshold(userValues, upperThreshold)

Explanation:

You might be interested in
In this exercise you will debug the code which has been provided in the starter file. The code is intended to do the following:
abruzzese [7]

Answer:

The corrected code is as follows:

import java.util.Scanner;

public class U2_L4_Activity_Two{

public static void main(String[] args){

Scanner scan = new Scanner(System.in);

String str1 = scan.nextLine();

String str2 = str1;

str1 = str1.toUpperCase();

System.out.println(str1);

System.out.println(str2);

}

}

Explanation:

This corrects the scanner object

Scanner scan = new Scanner(System.in);

This line is correct

String str1 = scan.nextLine();

This copies str1 to str2

String str2 = str1;

This converts str1 to upper case

str1 = str1.toUpperCase();

This prints str1

System.out.println(str1);

This prints str2

System.out.println(str2);

8 0
3 years ago
PLEASE SOMEONE ANSWER THIS
maw [93]
Maybe 7411 or someones birthday in the family
3 0
2 years ago
Read 2 more answers
I need help with this plz! It’s for a test and I really need help
Bas_tet [7]

Answer:

c

Explanation:

assuming you are coding in python and have not install any calculation codes, the answer is most likely c

4 0
3 years ago
Complete the sentence. <br><br> ____ Is the study and use of very small technology units
kondor19780726 [428]

Answer:

nanotechnology

Explanation:

I just took the test

3 0
3 years ago
Which browser folder contains previously viewed web pages?
Arlecino [84]
<span>The history browser folder contains previously viewed web pages. This folder </span>stores the URLs of sites you have accessed within a defined period of time, which means you can see your browsing history.
<span> You can choose how you want to view the history by selecting a filter from the menu on the history tab.</span>
6 0
3 years ago
Other questions:
  • If you have a 3D printer please show me a vid of you making something because I'm interested in getting one. Ty! Also can someon
    12·1 answer
  • Write a program that asks the user to input four numbers (one at a time). After the four numbers have been supplied, it should t
    6·1 answer
  • Why is time management considered a soft skill
    10·2 answers
  • Gabriel needs to create a formula that does not change when it is copied to cell b2. which formula should he create?
    14·1 answer
  • Declare an array named tax rates of five elements of type double and initialize the elements (starting with the first) to the va
    12·1 answer
  • If you are involved in a collision that results in property damage, injury, or death, you must call
    13·1 answer
  • The greatest common divisor of integers x and y is the largest integer that evenly divides into both x and y. Write a recursive
    7·1 answer
  • What are the OSHA construction standards also called ?
    10·1 answer
  • Imagine you were going to use a dedicated workstation for an animation job rather than a personal PC or the all-purpose PCs you
    5·1 answer
  • Algorithm to eat orange<br><br>​
    10·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!