Question
Exercice 1 Write a Python program that asks the user for a number N then your program should display the multiplication table for N. Your
Exercice 1 Write a Python program that asks the user for a number N then your program should display the multiplication table for N. Your output should look like this (input chosen is just an example) Input a number N: 7 7*0=0 7*1=7 7 * 2 = 14 .... Exercice 2 Write a Python program that asks the user for two numbers then an operator. Your program should display the result after applying the operator (Refer to the execution bellow). Make sure that you repeat the process till the user decides to stop. Please input two numbers: 12 4 Please input an operator (+,-,/,* or quit ) : / 12 /4 =3 Please input two numbers: 5 3 Please input an operator (+,-,/,* or quit ) : $ Sorry that was a wrong choice! Please input an operator (+,-,/,* or quit ) : quit BYE Exercice 3 You charge your cash wallet with an initial amount at the beginning of the semester and this amount is changed every time you buy an item on campus. Normally you can keep using your cash wallet as long as your budget is not zero. However, AUI is allowing you to go for a negative budget, lets say up to -500 MAD. Write a Python program that asks the user for an initial amount and change it every time the user buys an item. Your program should stop you from buying when your budget reaches -500 MAD. Exercise 4 Write a Python program that asks a user for 5 courses codes, and your program should display the total number of credits of all these courses. Your execution should look like this: Input course code1: CSC1400 Input course code2: ECO2301 Input course code3: ACC2301 Input course code4: COM1301 Input course code5: HIS2301 --> You took 16 credits Exercise 5 For the exercises 1-4, convert every code to the other loop type if possible
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started