A Day Computer Science Manzoor DL 17 due 2:30 PM

IMPORTANT MESSAGE
************************************************
FINAL TERM EXAMINE WILL BE TAKEN IN THREE PARTS BETWEEN (MAY 26 to 28)
PART 1: VOCABULARY TERMS
PART 2: PROGRAMMING CODES
Q1 . A set of instruction given to the computer is called:
Hardware
Software
Computer language
Computer tricks

Q2 . The programming languages that are close to human language are called:
Low level language
Machine language
High level language
Assembly language

Python Programming Question:
Write a program that prints a random number from 1 to 100.
Hint: Using randint () function

https://www.geeksforgeeks.org/python-randint-function/

Hints:

See code below, try changing
r1 = random.randint(0, 10)
to
r1 = random.randint(1, 100)

Code #1 :

filter_none
edit
play_arrow
brightness_4
# Python3 program explaining work
# of randint() function
 
# imports random module
import random
 
# Generates a random number between
# a given positive range
r1 = random.randint(0, 10)
print("Random number between 0 and 10 is % s" % (r1))
 


Code #1 :
filter_none
edit
play_arrow
brightness_4
# Python3 program explaining work
# of randint() function 
  
# imports random module
import random
  
# Generates a random number between
# a given positive range
r1 = random.randint(0, 10)
print("Random number between 0 and 10 is % s" % (r1))
  

Comments

Popular posts from this blog

B day Urbankowski.United States History II B 4-5 Due 2:30 PM DL-FinalExam-BP2DoNow+Classwork

Due 4:30 PM *Welcoming* Wednesday N Tabor Wednesday's theme Welcoming Wednesday.

ELA Do Now by 2:30 pm Quote citations Classwork pp. 61-100 start get some in today finish Wed. Ms. Casella