Posted at 23:46h
in
Uncategorized
by admin
Question 1:
Write a program that asks the user to enter his/her name, age, favorite color, and favorite food. Have the program save all four items to a text file called myinfo.txt, each one on a separate line.
Question 2:
Write a program that asks the user to enter...
Posted at 23:45h
in
Uncategorized
by admin
Question 1:
Write a program that asks the user to enter his/her name, age, favorite color, and favorite food. Have the program save all four items to a text file called myinfo.txt, each one on a separate line.
Question 2:
Write a program that asks the user to...
Posted at 17:41h
in
Uncategorized
by admin
Question:
Create a Python class Person with attributes: name and age of type string.
Create a display() method that displays the name and age of an object created via the Person class.
Create a child class Employee which inherits from the Person class and which also has two attributes position and...
Posted at 18:16h
in
Uncategorized
by admin
Question 1:
The hailstone sequence starting at a positive integer n is generated by following two simple rules. If n is even, the next number in the sequence is n/2. If n is odd, the next number in the sequence is 3*n+1. Repeating this process, we generate the hailstone sequence. Write a recursive function hailstone(n) which prints the...
Question:The clothing factory made very nice t-shirts. But it's very tired for the staff to get hundreds of pieces of clothing shipped to the store! So they want to find the shortest route to the store from the clothing factory, you can help them?
Input FormatThere...
Question:
Joe Coder is camping near the Bay of Fundy between Nova Scotia and New Brunswick. When he arrived at the bay, he was told that the difference in height between high tide and low tide at the Bay of Fundy was the largest tidal difference...