Posted at 18:45h
in
Uncategorized
by admin
Question 1.
Write a program that asks for your first name, then asks for your last name, and then prints a message with your first and last names in it.
Hint:
Use input() to ask question and get answer, for example:
firstName = input("What is your first name?")
The string answer as value will be assigned...
Posted at 18:38h
in
Uncategorized
by admin
Question 1:
Write a program to ask the user for five names. The program should store the names in a list, and print them all out at the end. It should look something like this:
Sample input:
Enter 5 names:
Tony
Paul
Nick
Michel
Kevin
Sample output:
The names are Tony, Paul, Nick, Michel, Kevin
Hint:
You...
Posted at 00:06h
in
archives
by admin
Question 1:(please use function that return a value)
Write a program to display information to a driver based on his/her speed according to the following table:
km/h over the limit
Fine
1 to 20
$100
21 to 30
$270
31 or above
$500
Sample Input 1:
Enter the speed limit: 40
Enter the recorded speed of the...
Posted at 00:02h
in
archives
by admin
Question 1
Mike, Cindy and Terry went to the orchard to pick apples. After a whole day of work, everyone picked a lot of apples. Please write a program ask how many apples each person has picked, then print the total apples all three of them...
Posted at 23:25h
in
Uncategorized
by admin
Question:
Create a Tank object which have the attributes of:
name
direction(up/down/left/right)
x position and
y position
The object also have a method:
move (direction, steps)
Using __init__ to Initial the tank to make sure it start from x position of 0 and y position of 0
Use print(tank object)...
Problem DescriptionAnnie has two favourite baseball teams: the Eagle and the Warrior. She has followed them throughout the season, which is now over. The season lasted for N days. Both teams played exactly one game on each day.
For each day, Annie recorded the number of...