Questions: 5 290

Answers by our Experts: 5 288

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

Write a python program to compute the smallest
number that is divisible by 2 inputed numbers using (while, for, break or continue)
Write a Python program which have number (73421):
 You should calculate (7 + 3 + 4 ….):




Write a program to display only those numbers from a list[12, 75, 150, 180, 145, 525, 50] that satisfy the following conditions

The number must be divisible by five
If the number is greater than 150, then skip it and move to the next number
If the number is greater than 500, then stop the loop
Write a program to display the first 7 multiples of 7 using both(for, while) loops

Indivisible Numbers(using nested for loops)



fin



number of positive integers K <= N such that K is not



for



4



5



You are given a positive integer N Your task is to find the divisible by any of the following numbers 2, 3, 4, 5, 6, 7, 8, 9, 10



6 prin



Custa



Input



The first line of input is an integer N



Output



The output should be an integer representing the number of positive integers satisfying the above condition.



Explanation



In the given sample input



N = 11



1 is not divisible by any of 2, 3, 4, 5, 6, 7, 8, 9, 10



2 is divisible by



2



3 is divisible by 3



11 is not divisible by any of 2, 3, 4, 5, 6, 7, 8, 9, 10



There are two numbers that are not divisible by 2, 3, 4, 5, 6, 7,



8, 9, 10



So the count is 2.



So, the output should be 2.


Sample Input 1



11



Sample Output 1



2



4



5



6 prin



Sample Input 2



12



Sample Output 2



2



Sample Input 3



268



Sample Output 3



47



Write a python program that implements a “Fahrenheit to

Celsius converter”. Upon program execution, the user is prompted to enter a

temperature in Fahrenheit and the program will output the corresponding temperature in

Celsius. The formula to convert a temperature given in Fahrenheit (F) to a

temperature in Celsius (C) is C = (F - 32)/1.8. Your solution should make use of floating

point (non-integer) values to obtain full marks. If you are not able to work with floating

point numbers, then provide an implementation with integer values (in this case, you can

use the following formula: C = (F - 32)/2. A solution that works only with integer values

will result in a decrease of marks but part marks will be provided.


Write a Python program that takes a String as an input from the user and counts the frequency of each character using a dictionary. For solving this problem, you may use each character as a key and its frequency as values. [You are not allowed to use the count() function] Hint: You can create a new dictionary to store the frequencies. You may ignore case for simplicity (i.e. may consider P and p to be the same). =================================================================== Sample Input: "Python programming is fun" Sample Output: {'p': 2, 'y': 1, 't': 1, 'h': 1, 'o': 2, 'n': 3, 'r': 2, 'g': 2, 'a': 1, 'm': 2, 'i': 2, 's': 1, 'f': 1, 'u': 1} 


Suppose you have been given the following list of tuples.

list_1 = [("a", 1), ("b", 2), ("a", 3), ("b", 1), ("a", 2), ("c", 1)]

Write a Python program that converts this list of tuples into a dictionary and then prints the

dictionary.

[You are not allowed to use set]

Hint: Think of membership operators (in and not in).

===================================================================

Output:

{'a': [1, 3, 2], 'b': [2, 1], 'c': [1]}

===================================================================


Write a python program that takes an input from the user and finds the number of times that the



input is present in a given tuple.



===================================================================



Example 1:



Given tuple: (10, 8, 5, 2, 10, 15, 10, 8, 5, 8, 8, 2)



Sample Input 1:



8



Sample Output 1:



8 appears 4 times in the tuple



===================================================================



Example 2



Given tuple: (10, 8, 5, 2, 10, 15, 10, 8, 5, 8, 8, 2)



Sample Input 2:



1



Sample Output 2:



1 appears 0 times in the tuple



===================================================================




Employee Record is composed of the following:

  • record_no
  • first_name
  • last_name
  • address
  • city
  • county
  • state
  • bdate
  • zip
  • phone1
  • phone2
  • email
  • web


In the given string, Each employee data is separated by comma (,). Each record is separated by semicolon (;).


A - The program must be able to display employee record based on the given key.

B - The program must be able to display the last name, first name and age of an

employee based on the given key. (assume that the current date is April 22, 2022)

C - The program must be able to display the number of employee in a given county.

D - The program must be able to count no. of employee based on a given email provider site.




1. data

Output


Enter·your·choice·(A/B/C/D/X-exit):·A
Enter·Record·No.:·10

First·Name:·Kris
Last·name:·Marrier
Address:·228·Runamuck·Pl·#2808
City:·Baltimore
County:·Baltimore·City
State:·MD
Birth·Date:·12/19/1983
zip:·21224
phone1:·410-655-8723
phone2:·410-804-4694
Email:·kris@gmail.com
web:·http://www.kingchristopheraesq.com

Enter·your·choice·(A/B/C/D/E/X-exit):·X
Bye!






LATEST TUTORIALS
APPROVED BY CLIENTS