Suppose you are given two dictionaries. Now create a new dictionary "marks", merging the two dictionaries, so that the original two dictionaries remain unchanged. Note: You can use dictionary functions. =================================================================== Given: {'Harry':15, 'Draco':8, 'Nevil':19} {'Ginie':18, 'Luna': 14} Output: {'Harry': 15, 'Draco': 8, 'Nevil': 19, 'Ginie': 18, 'Luna': 14} =================================================================== Given: {'A':90, 'B': 0} {'C':50} Output: {'A': 90, 'B': 0, 'C': 50}
Using a class to represent the planet and its gravity, develop a program that outputs the user's weight on different planets.
Write a Python program that asks the user to enter a store’s sales for each day of the week. The sales amounts should be stored in a list. Use a loop to calculate the total sales for the week and display the result. Do not use built-in Python function like sum to perform the calculation
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.
You have to run the code of BFS algorithms 5 time
Each time u have to pass different number of values to the list
1)20k 2)30k 3)50k 4) 80k 5)90k
(pass random values to list of given above ranges using random (import random)
Note: you have to search on Google (“how to create random list for specified range with random”)
Calculate time for BFS algorithms by using “import time”
Note : search on Google how to get time in seconds
Make a table and store your results after calculating time for each algorithms
values
Time for bfs
20k
30k
50k
80k
90k