You are going to write a program that asks the user for some positive integers. The program will start by asking the user to enter in how many numbers they want to enter. The program should then ask for all the numbers and then output the division between the biggest number entered and the smallest number entered.
Bill and Nick are playing a game in gym class. The teacher tells both Nick and Bill to walk forward a certain number of steps and then walk backward a different amount of steps.
After they each take a certain number of steps, which we will call S, the teacher will blow the whistle and the boys will stop.
Write a program that inputs A,B,C,D,S and outputs their motion along with who is further from the starting point. Output tied if they are the same distance.
Sample Input
• A = 4, B = 2, C = 5, D = 3, S = 13
Sample Output
Nick
F F F F B B F F F F B B F = 5 paces from the start
Bill
F F F F F B B B F F F F F = 7 paces from the start
Bill is Ahead after 13 steps
Mastery Question – STEPS
Write a program that asks for the side length of an Isosceles Triangle and then draws 2 of them side by side on the screen. There should be 2 spaces between the base of the triangles.
You are going to display a bar graph with 5 bars.
Ask for each of the values in the bar graph and then using the symbol of your choice, draw the correct number of symbols horizontally across your screen. The maximum number that the user is going to enter will be 30.
If the user entered 3, 1, 6, 2, 5, your output might look like
You are going to write a program to create simple math questions using the addition, subtraction, multiplication (NOT DIVISION) of random integers.
Your program should generate the random math question, and ask for the answer.
After getting it correct or running out of tries, ask the user if they wish to continue playing the game.
Write a program that asks the user for an integer and then prints the pattern below depending on the integer entered
Check out our programing in python courses that focus on high school level coding.
These courses are complete with interactive coding lessons, teacher led videos, and more practice questions with complete solutions
Return To International Baccalaureate Computer Science Main Page