subject
Computers and Technology, 14.10.2020 01:01 arri05

Write a Python program stored in a file q1.py that : Gets a number as an input from the user and stores it in a variable. That number represents the length of a list. The program should then keep prompting until the user enters a valid number which is less than 10, and greater than 2. Creates a list where the user enters each entry in the list (explicitly convert each entry to type int). An entry is considered valid only if it is strictly greater than 0. If the entry is not valid, then the program should re-run from the invalid entry index, until valid entries are entered by the user. Gets a target number as an input from the user, and prints any two distinct list entries (values and indices) whose sum is equal to the target number. If no such entries are found then prints the sum of all the entries of the list.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 23:30
Me2540 week 5 assignment what do i want to know?
Answers: 1
question
Computers and Technology, 22.06.2019 07:30
Jasper and samantha are in a robotics competition. the guidelines state that the robots should be able to move a 10-gram weight at least 2 meters and turn in a circle. jasper and samantha have already built the robot. which step of the design process should they follow next to decide whether their robot meets the minimum criteria for the competition?
Answers: 1
question
Computers and Technology, 22.06.2019 12:10
1. declare a constant named cents_per_pound and initialize with 25. 2. get the shipping weight from user input storing the weight into shipweightpounds. 3. using flat_fee_cents and cents_per_pound constants, assign shipcostcents with the cost of shipping a package weighing shipweightpounds.
Answers: 2
question
Computers and Technology, 22.06.2019 21:00
Ulia is planning to attend the same private four-year college her parents attended. she wants to save at least $18,000 in four years to contribute to her college education. which monthly deposit amounts can julia use to achieve her goal? check all that apply.
Answers: 2
You know the right answer?
Write a Python program stored in a file q1.py that : Gets a number as an input from the user and sto...
Questions
question
Mathematics, 29.09.2020 06:01
question
Mathematics, 29.09.2020 06:01
question
English, 29.09.2020 06:01
Questions on the website: 13722361