Describe at least three additional python experiments that you tried.show the python input and their output and explain what you learned from the results of each example
# Function: Display the Bitcoin price in the menu item – to assist the user when setting price levels
def updateMenuPrice(self):
# Get the latest Bitcoin info (as a Tick object) from getBitMexPrice(). Name it tickObj.
tickObj = self.getBitMexPrice()
# Update the currentPrice property with the Bitcoin price in tickObj.
...
replace ellipsis with applicable code
If you run a 10 kilometer race in 42 minutes 42 seconds , what is your average pace ( time per mile in minutes and seconds )? What is your average speed in miles per hour
Traingles
Given three sides of the triangle(a, b, c) as input. Write a program to determine whether the triangle is Equilateral, Isosceles or Scalene.
Input
The first line of input will contain an integer A.
The second line of input will contain an integer B.
The third line of input will contain an integer C.
Output
If the given sides A, B and C are equal, print "Equilateral".
In the given sides any of two sides are equal print "Isosceles".
If the given sides A, B, C are not equal to each other, print "Scalene".
Explanation
For example, if the given sides are 4, 4, 4 the output should be "Equilateral".
Similarly, if the given sides are 3, 2, 3 the output should be "Isosceles".
Hand game
Abhinav and Anjali are playing Rock-Paper-Scissors game. Rock-Paper-Scissors is a hand game usually played between two people, in which each player simultaneously forms one of three shapes with an outstretched hand. These shapes are "rock", "paper" and "scissors". Based on the shapes the player chooses the outcome of the game is determined. A rock beats scissors, scissors beat paper by cutting it, and paper beats rock by covering it. If the same shape is chosen by both of the players, then it is tie. Write a program to decide the winner of each round of the game based on the shapes the players chose.
Input
The first line of input will be one of the strings "Rock", "Paper", "Scissors", representing the shape chosen by Abhinav. The second line of input will be the sting representing the shape chosen by Anjali..
Maximum number of handshakes
It was Raj's first day at school. His teacher Anu asked the students to meet every other student in the class and to introduce themselves. The teacher asked them to do handshakes when they meet each other. If there are N number of students in the class then write a program to print the total number of handshakes made by the students.
Input
The first line is a single integer N
Output
Print the value representing total number of handshakes
Explanation
In the given example there are 5 persons. The first person shakes his hand with 4 persons. The second person then shakes his hand with 3 persons. The third person shakes his hand with 2 persons. The fourth person shakes his hand with 1 person.
From this, the number of handshakes = 4 + 3 + 2 + 1
So, the output should be 10
.
Leap Year
Write a program to determine whether the given year Y is a leap year or not. A normal year consists of 365 days. But the time required for Earth to revolve around the Sun is around 365.2425 days. So a "leap year" of 366 days is used once every four years to eliminate the error caused by three normal (but short) years. Any year that is divisible by 4 is usually a leap year: for example, 1988, 1992, and 1996 are leap years.
However, there is still a small error that must be accounted for. To eliminate this error, the calendar considers that a year that is divisible by 100 (for example, 1900) is a leap year only if it is also divisible by 400. For this reason, the following years are not leap years: 1700, 1800, 1900, 2100, 2200, 2300, 2500, 2600, ... This is because they are divisible by 100 but not by 400.
The following years are leap years: 1600, 2000, 2400 This is because they are divisible by both 100 and 400.
Write a Menu driven Program which include these operations like Creating an array, insertion, deletion and fetching all the elements from an array?