Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Can two problems written in python please. Thank you in advance. Below is my posted work and I just want to verify with someone else

Can two problems written in python please. Thank you in advance. Below is my posted work and I just want to verify with someone else code. I know every logic is different but it will give me a sense of structure. Thank you

1. Get two numbers from users and assign them to variables x and y.

If variable x is smaller than variable y, print out x is smaller than y.

If x is equal to y print x is equal to y.

Otherwise, print y is smaller than x.

2. Get a number from a user.

If the number is equal to 100 print value of the variable is 100.

If the number is equal to 200 print value of the variable is 200.

If the number is equal to 300 print value of the variable is 300.

If the number is equal to 400 print value of the variable is 400.

Otherwise, print Not found!

image text in transcribed

1) Get two numbers from users and assign them to var ibles x&y X is =input int ("Give me a nubber for the X-value:" ) y= mpat int "Grive me a number for the y-value:") If in x:LY print( x "is smatter than " y ) elif; if x=z=y : Print ( x " is equal to " y) else : Print ( y ".is smaller than " x)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Beginning Databases With PostgreSQL From Novice To Professional

Authors: Richard Stones, Neil Matthew

2nd Edition

1590594789, 978-1590594780

More Books

Students also viewed these Databases questions