Write a few lines in Python that will do the following:
Write a few lines in Python that will do the following: Create an empty list Ask...
Write a few lines of Python that will do the following: - Create an empty list called all_numbers - Use a for loop to ask the user for 20 numbers (ints.). Add each number to all_numbers. - Use another loop to print each number in all_numbers that is between 10 an 20.
write in python Create a program that will ask the user for a list of integers, all on one line separated by a slash. construct a list named "adj_numbers" which contains the users input numbers after subtracting 2 from each number. then print the resulting list. the input statement and print statement are given to you in the starting code. a sample run of the program is as follows: Enter a list of integers, separated by slashes: 7/3/6/8 resulting list:...
Create a new Python program in IDLE, and save it as lab8.py.(Again, I recommend saving lab progranms Your Python program will do the following: Create an empty list . Use a for loop to ask the user for 10 numbers. Add each number to your list using the append metha . Use another for loop to print the list in reverse order, one per line . Use a while loop to count how many positive numbers are in the list...
Please complete the following: Write a Python script to do the following: 1. Ask the use to enter several sentences, one at a time in a loop). To end the sentence entry, the user enters a blank (empty) sentence. 2. Extract each word from each sentence and put it in a list. This will require at least one loop to go through each sentence in the list. It is up to you how you want to get the words in...
write a python software with the following
Input The name and phone number for a contact Output The contents of the list after the contact has been added to the list. Processing • Welcome the user to the contact storage software. • Create 2 empty lists: one for names and one for phone numbers. Ask the user to enter the name and phone number of one new contact. Append the newly entered name to the nameList. Append the newly entered...
Solve all using Python
7. Create a list of strings, don't ask from the user, and return the count of the number of strings where the string length is 2 or more and the first and last chars of the string are the same (use for loop to go through the list). 8. The file State.txt contains the 50 U.S. states in the order in which they joined the union. Write a program to display the original 13 states in...
Write a PYTHON program that allows the user to navigate the lines of text in a file. The program should prompt the user for a filename and input the lines of text into a list. The program then enters a loop in which it prints the number of lines in the file and prompts the user for a line number. Actual line numbers range from 1 to the number of lines in the file. If the input is 0, the...
Problem 1 Write a Python program to do the following: (A) Ask the user to enter as many integers from 1 to 10 as he/she wants. Store the integers entered by the user in a list. Every time after the user has entered an integer, use a yes/no type question to ask whether he/she wants to enter another one. (B) Display the list. (C) Calculate and display the average of the integers in the list. (D) If the average is...
Write a python program: Ask for the encryption key. The key must be a list of numbers between 0 and N-1, where N is the number of entries in the key's list; for example, 5,4,3,2,1,0 has six numbers, and each digit 0-5 appears in the list. Asks for a line of text to encrypt. Use the transposition key to transpose each chunk of N letters in input text. If the input text is not a multiple of the key length,...
Can someone fix this python program? I'm trying to do three things: Create a function that takes in a string as a parameter. Then create a dictionary of characters to integers, where the integer represents how many times the number of times the character appears in the word. Create a function that takes two lists as parameters and returns the elements they have in common of the two lists. Ask the user to create a list of numbers and keep...