Answer:
She made a profit of 450$
Explanation:
4.16 LAB: Count characters Write a program whose input is a character and a string, and whose output indicates the number of times the character appears in the string. The output should include the input character and use the plural form, n's, if the number of times the characters appears is not exactly 1. Ex: If the input is: n Monday the output is: 1 n Ex: If the input is: z Today is Monday the output is: 0 z's Ex: If the input is: n It's a sunny day the output is: 2 n's Case matters. Ex: If the input is: n Nobody the output is: 0 n's
Answer:
In Python:
sttr = input("String: ")
ch = input("Character: ")
count = sttr.count(ch)
print(str(count)+" "+ch, end = '')
if count>1 or count==0:
print("'s")
Explanation:
This prompts the user for string
sttr = input("String: ")
This prompts the user for character
ch = input("Character: ")
This counts the number of occurrence
count = sttr.count(ch)
This prints the number of occurrence of the character
print(str(count)+" "+ch, end = '')
This checks if the number of occurrence is 0 or greater than 1.
if count>1 or count==0:
If yes, it prints 's
print("'s")
Create a list called numbers containing the values from 1 through 15, then use slices to perform the following operations consecutively: a. Select number’s even integers. b. Replace the elements at indices 5 through 9 with 0s, then show the resulting list. c. Keep only the first five elements, then show the resulting list. d. Delete all the remaining elements by assigning to a slice. Show the resulting list.
Answer:
Kindly check explanation
Explanation:
From python :
List containing values from 1 through 15:
my_list = list(range(1,16))
#creates a list of values from 1 to 15,(16 is excluded)
B.) select even integers :
for digits in my_list :
if digit%2 == 0;
print(digit)
# prints numbers in the list which does not leave a remainder when divided by .
C.)
for digits in my_list[4,9]:
my_digit[digits] = 0
my_digits
#Replaces the elements at indices 5 through 9 with 0s, then show the resulting list.
D.)
my_digits[:5]
#selects digits with index 0 up to 4
E.)
del my_digits[:5]
#DELETE elements in my digits starting from the fifth index
What are the disadvantages of using folders
Answer:
√ folders can cause some inconvenience situation...
√ The decompress / compress action takes time.
√ When you double-click on a file inside a “folder”, what really happens is the file gets extracted to a temporary folder.
heres one:
when you delete a folder, he stuff inside gets deleted, and there isnt a way to get it back.
3.5 code practice question 1
Answer:
what is this a question or just saying something?
Explanation:
Answer:
uh what?
Explanation: